Skip to content

Commit 7b75dd6

Browse files
committed
Fix incorrect terminology for generating scripts/fill_help_tables.sql
Remove inconsistencies in replication terminology (master/slave vs. primary/replica), in the files that are needed to generate the help tables for the server source tree (scripts/fill_help_tables.sql).
1 parent 344ce20 commit 7b75dd6

23 files changed

Lines changed: 319 additions & 319 deletions

File tree

server/ha-and-performance/optimization-and-tuning/optimizing-tables/optimize-table.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This statement requires [SELECT and INSERT privileges](../../../reference/sql-st
3333

3434
By default, `OPTIMIZE TABLE` statements are written to the [binary log](../../../server-management/server-monitoring-logs/binary-log/) and will be [replicated](../../standard-replication/replication-overview.md). The `NO_WRITE_TO_BINLOG` keyword (`LOCAL` is an alias) will ensure the statement is not written to the binary log.
3535

36-
`OPTIMIZE TABLE` statements are not logged to the binary log if [read\_only](../system-variables/server-system-variables.md#read_only) is set. See also [Read-Only Replicas](../../standard-replication/read-only-replicas.md).
36+
`OPTIMIZE TABLE` statements are not logged to the binary log if [read\_only](../system-variables/server-system-variables.md#read_only) is set. See also [Read-Only Slaves](../../standard-replication/read-only-replicas.md).
3737

3838
`OPTIMIZE TABLE` is also supported for partitioned tables. You can use [ALTER TABLE ... OPTIMIZE PARTITION](../../../reference/sql-statements/data-definition/alter/alter-table/#optimize-partition) to optimize one or more partitions.
3939

server/ha-and-performance/standard-replication/gtid.md

Lines changed: 101 additions & 101 deletions
Large diffs are not rendered by default.

server/ha-and-performance/standard-replication/innodb-based-binary-log.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Traditionally, MariaDB treated the [binary log](../../server-management/server-m
1717

1818
InnoDB-based binary logs entirely replace traditional file-based binary logs. When enabled, the server stops writing traditional binlog files, and the new format becomes the only binary log implementation in use.
1919

20-
Additionally, this feature is limited to the binary log on the server. The relay log on replicas continues to use the traditional implementation and is not affected by the use of InnoDB-based binary logs.
20+
Additionally, this feature is limited to the binary log on the server. The relay log on slaves continues to use the traditional implementation and is not affected by the use of InnoDB-based binary logs.
2121

2222
## Enabling the InnoDB Binlog
2323

@@ -113,18 +113,18 @@ The new binlog implementation requires GTID-based replication. The GTID state is
113113
innodb-binlog-state-interval=2097152
114114
```
115115

116-
The binary log from the last GTID state record is scanned when a replica connects in order to find the determined location.
116+
The binary log from the last GTID state record is scanned when a slave connects in order to find the determined location.
117117
The variable innodb-binlog-state-interval can be used to balance the cost of this scan against the extra space needed for the records; however this should have little impact in practice and normally can be left at the default.
118118

119119
For additional configuration options, see [Replication and Binary Log System Variables](replication-and-binary-log-system-variables.md).
120120

121121
#### Replication
122122

123-
Using the new binlog, [replication](./) configuration from the primary can be performed as usual. For that:
123+
Using the new binlog, [replication](./) configuration from the master can be performed as usual. For that:
124124

125-
* Replicas must use GTID to connect to the primary (this is the default).
126-
* Replicas should run MariaDB 12.3 or later when replicating from primary.
127-
* The primary and replica can independently use either the traditional or new binlog format.
125+
* Slaves must use GTID to connect to the master (this is the default).
126+
* Slaves should run MariaDB 12.3 or later when replicating from master.
127+
* The master and slave can independently use either the traditional or new binlog format.
128128

129129
### Viewing Binlog Events
130130

@@ -203,7 +203,7 @@ slave_connections_needed_for_purge=0
203203
Note that binary log files are only deleted when:
204204

205205
* Limits on time or size are exceeded.
206-
* Files are not required for crash recovery or by active replicas.
206+
* Files are not required for crash recovery or by active slaves.
207207

208208
## Backup using mariadb-backup
209209

@@ -215,9 +215,9 @@ Key features:
215215

216216
* Consistent transactional backup for binlog files, similar to other [InnoDB](../../server-usage/storage-engines/innodb/) data.
217217
* Backups are non-blocking, meaning the server continues running normally. By default, only `RESET MASTER`**,** `PURGE BINARY LOGS`, and `FLUSH BINARY LOGS` are blocked during backup. This blocking can be disabled with the `--no-lock` option.
218-
* A restored backup can be used to set up a replica for replication.
218+
* A restored backup can be used to set up a slave for replication.
219219

220-
### Setting Up Replica from Backup
220+
### Setting Up Slave from Backup
221221

222222
```bash
223223
# Default backup includes binlog files
@@ -273,12 +273,12 @@ This is the simplest approach, appropriate for cases where replication or point-
273273

274274
#### Method 2: Replication State Migration (GTID Preservation)
275275

276-
This approach is used to switch a primary server while ensuring that connected replicas can continue replicating without the need for a full reconfiguration.
276+
This approach is used to switch a master server while ensuring that connected slaves can continue replicating without the need for a full reconfiguration.
277277

278-
1. Stop all writing to the primary.
279-
2. Wait for all replicas to catch up to the primary's current position.
278+
1. Stop all writing to the master.
279+
2. Wait for all slaves to catch up to the master's current position.
280280
3. Capture the current GTID state by noting down the value of `@@binlog_gtid_state`.
281-
4. Restart the primary with this configuration:
281+
4. Restart the master with this configuration:
282282

283283
```ini
284284
[mariadb]
@@ -287,17 +287,17 @@ This approach is used to switch a primary server while ensuring that connected r
287287
```
288288

289289
5. Immediately execute `SET GLOBAL binlog_gtid_state=<old value>` using the value saved in step 3.
290-
6. Allow replicas to reconnect; they will continue from where they left off.
290+
6. Allow slaves to reconnect; they will continue from where they left off.
291291

292292
#### Method 3: Live Migration (Zero downtime)
293293

294-
This is the most robust method for production environments, as it avoids primary downtime during the format transition.
294+
This is the most robust method for production environments, as it avoids master downtime during the format transition.
295295

296-
1. Ensure that all replicas are upgraded to at least MariaDB version 12.3 before switching the primary.
297-
2. Choose a replica and restart it with `--binlog-storage-engine=innodb`.
298-
3. Allow the replica to replicate from the old-format primary until it has enough binlog data.
299-
4. Promote this replica to be the new primary.
300-
5. Restart the remaining replicas to point to the new primary after stopping them one at a time and changing their configuration to the new binlog format.
296+
1. Ensure that all slaves are upgraded to at least MariaDB version 12.3 before switching the master.
297+
2. Choose a slave and restart it with `--binlog-storage-engine=innodb`.
298+
3. Allow the slave to replicate from the old-format master until it has enough binlog data.
299+
4. Promote this slave to be the new master.
300+
5. Restart the remaining slaves to point to the new master after stopping them one at a time and changing their configuration to the new binlog format.
301301

302302
## Performance Characteristics
303303

server/ha-and-performance/standard-replication/replication-and-binary-log-system-variables.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
251251

252252
#### `binlog_row_event_fragment_threshold`
253253

254-
* Description: When a `Rows_log_event` exceeds this threshold, it is fragmented into multiple `Partial_rows_log_event` events in the binary log, each of it configured to maximum size. That is, all `Partial_rows_log_event` events up to the last in the group have this configured maximum size, and the last event takes the remaining size. This is relevant for events that would surpass the `slave_max_allowed_packet` length when sending to the replica, and thereby a sensible value would reflect the replica's configured `slave_max_allowed_packet` size.
254+
* Description: When a `Rows_log_event` exceeds this threshold, it is fragmented into multiple `Partial_rows_log_event` events in the binary log, each of it configured to maximum size. That is, all `Partial_rows_log_event` events up to the last in the group have this configured maximum size, and the last event takes the remaining size. This is relevant for events that would surpass the `slave_max_allowed_packet` length when sending to the replica, and thereby a sensible value would reflect the slave's configured `slave_max_allowed_packet` size.
255255
* Command line: `--binlog-row-event-fragment-threshold`
256256
* Scope: Global
257257
* Dynamic: Yes
@@ -382,7 +382,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
382382

383383
#### `init_slave`
384384

385-
* Description: Similar to [init\_connect](../optimization-and-tuning/system-variables/server-system-variables.md#init_connect), but the string contains one or more SQL statements (separated by semicolons) that are executed by a replica server each time the SQL thread starts. These statements are only executed after the acknowledgement is sent to the replica and [START REPLICA](../../reference/sql-statements/administrative-sql-statements/replication-statements/start-replica.md) completes.
385+
* Description: Similar to [init\_connect](../optimization-and-tuning/system-variables/server-system-variables.md#init_connect), but the string contains one or more SQL statements (separated by semicolons) that are executed by a replica server each time the SQL thread starts. These statements are only executed after the acknowledgement is sent to the replica and [START SLAVE](../../reference/sql-statements/administrative-sql-statements/replication-statements/start-replica.md) completes.
386386
* Command line: `--init-slave=name`
387387
* Scope: Global
388388
* Dynamic: Yes
@@ -483,7 +483,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
483483

484484
#### `master_info_file`
485485

486-
* Description: The location and name of the file that remembers the primary and where the I/O replication thread is in the primary's binlogs. Defaults to primary.info.
486+
* Description: The location and name of the file that remembers the master and where the I/O replication thread is in the master's binlogs. Defaults to master.info.
487487
* Command line: `--master-info-file=val`
488488
* Scope: Global
489489
* Dynamic: No
@@ -752,15 +752,15 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
752752

753753
#### `report_host`
754754

755-
* Description: The host name or IP address the replica reports to the primary when it registers. If left unset, the replica does not register itself. Reported by [SHOW REPLICA HOSTS](../../reference/sql-statements/administrative-sql-statements/show/show-replica-hosts.md). Note that it is not sufficient for the primary to simply read the IP of the replica from the socket once the replica connects. Due to NAT and other routing issues, that IP may not be valid for connecting to the replica from the primary or other hosts.
755+
* Description: The host name or IP address the replica reports to the primary when it registers. If left unset, the replica does not register itself. Reported by [SHOW SLAVE HOSTS](../../reference/sql-statements/administrative-sql-statements/show/show-replica-hosts.md). Note that it is not sufficient for the primary to simply read the IP of the replica from the socket once the replica connects. Due to NAT and other routing issues, that IP may not be valid for connecting to the replica from the primary or other hosts.
756756
* Command line: `--report-host=host_name`
757757
* Scope: Global
758758
* Dynamic: No
759759
* Data Type: `string`
760760

761761
#### `report_password`
762762

763-
* Description: Replica password reported to the primary when it registers. Reported by [SHOW REPLICA HOSTS](../../reference/sql-statements/administrative-sql-statements/show/show-replica-hosts.md) if `--show-slave-auth-info` is set. This password has no connection with user privileges or with the [replication](../../server-usage/storage-engines/myrocks/myrocks-and-replication.md) user account password.
763+
* Description: Replica password reported to the primary when it registers. Reported by [SHOW SLAVE HOSTS](../../reference/sql-statements/administrative-sql-statements/show/show-replica-hosts.md) if `--show-slave-auth-info` is set. This password has no connection with user privileges or with the [replication](../../server-usage/storage-engines/myrocks/myrocks-and-replication.md) user account password.
764764
* Command line: `--report-password=password`
765765
* Scope: Global
766766
* Dynamic: No
@@ -778,7 +778,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
778778

779779
#### `report_user`
780780

781-
* Description: Replica's account user name reported to the primary when it registers. Reported by [SHOW REPLICA HOSTS](../../reference/sql-statements/administrative-sql-statements/show/show-replica-hosts.md) if `--show-slave-auth-info` is set. This username has no connection with user privileges or with the [replication](../../server-usage/storage-engines/myrocks/myrocks-and-replication.md) user account.
781+
* Description: Replica's account user name reported to the primary when it registers. Reported by [SHOW SLAVE HOSTS](../../reference/sql-statements/administrative-sql-statements/show/show-replica-hosts.md) if `--show-slave-auth-info` is set. This username has no connection with user privileges or with the [replication](../../server-usage/storage-engines/myrocks/myrocks-and-replication.md) user account.
782782
* Command line: `--report-user=name`
783783
* Scope: Global
784784
* Dynamic: No
@@ -935,7 +935,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
935935
* [slave\_parallel\_max\_queued](replication-and-binary-log-system-variables.md) \* [slave\_parallel\_threads](replication-and-binary-log-system-variables.md)
936936
* This system variable is only meaningful when parallel\
937937
replication is configured (i.e. when [slave\_parallel\_threads](replication-and-binary-log-system-variables.md) > `0`).
938-
* See [Parallel Replication: Configuring the Maximum Size of the Parallel Replica Queue](parallel-replication.md#configuring-the-maximum-size-of-the-parallel-slave-queue) for more information.
938+
* See [Parallel Replication: Configuring the Maximum Size of the Parallel Slave Queue](parallel-replication.md#configuring-the-maximum-size-of-the-parallel-slave-queue) for more information.
939939
* Command line: `--slave-parallel-max-queued=#`
940940
* Scope: Global
941941
* Dynamic: Yes
@@ -980,7 +980,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
980980

981981
#### `slave_run_triggers_for_rbr`
982982

983-
* Description: See [Running triggers on the replica for Row-based events](running-triggers-on-the-replica-for-row-based-events.md) for a description and use-case for this setting.
983+
* Description: See [Running triggers on the slave for Row-based events](running-triggers-on-the-replica-for-row-based-events.md) for a description and use-case for this setting.
984984
* Command line: `--slave-run-triggers-for-rbr=value`
985985
* Scope: Global
986986
* Dynamic: Yes
@@ -1086,7 +1086,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
10861086

10871087
#### `sync_master_info`
10881088

1089-
* Description: A [replication](../../server-usage/storage-engines/myrocks/myrocks-and-replication.md) replica synchronizes its primary.info file to disk after this many events. If set to 0, the operating system handles flushing the file to disk.
1089+
* Description: A [replication](../../server-usage/storage-engines/myrocks/myrocks-and-replication.md) replica synchronizes its master.info file to disk after this many events. If set to 0, the operating system handles flushing the file to disk.
10901090
* Command line: `--sync-master-info=#`
10911091
* Scope: Global
10921092
* Dynamic: Yes

server/reference/sql-functions/secondary-functions/miscellaneous-functions/master_pos_wait.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
description: >-
3-
Wait for a replica to reach a log position. This function blocks until the
4-
replica has read and applied updates up to a specified position in the
5-
primary's binary log.
3+
Wait for a slave to reach a log position. This function blocks until the
4+
slave has read and applied updates up to a specified position in the
5+
master's binary log.
66
---
77

88
# MASTER\_POS\_WAIT
@@ -15,8 +15,8 @@ MASTER_POS_WAIT(log_name,log_pos[,timeout,["connection_name"]])
1515

1616
## Description
1717

18-
This function is useful in [replication](../../../../ha-and-performance/standard-replication/replication-overview.md) for controlling primary/replica synchronization. It blocks until the replica has read and applied all updates up to the specified position (`log_name,log_pos`) in the primary's binary log. The return value is the number of log events the replica had to wait for to advance to the specified position. The function returns `NULL` if the replica SQL thread is not started, the replica's primary information is not initialized, the arguments are incorrect, or an error occurs. It returns -1 if\
19-
the timeout has been exceeded. If the replica SQL thread stops while`MASTER_POS_WAIT()` is waiting, the function returns `NULL`. If the replica is past the specified position, the function returns immediately.
18+
This function is useful in [replication](../../../../ha-and-performance/standard-replication/replication-overview.md) for controlling master/slave synchronization. It blocks until the slave has read and applied all updates up to the specified position (`log_name,log_pos`) in the master's binary log. The return value is the number of log events the slave had to wait for to advance to the specified position. The function returns `NULL` if the slave SQL thread is not started, the slave's master information is not initialized, the arguments are incorrect, or an error occurs. It returns -1 if\
19+
the timeout has been exceeded. If the slave SQL thread stops while`MASTER_POS_WAIT()` is waiting, the function returns `NULL`. If the slave is past the specified position, the function returns immediately.
2020

2121
If a `timeout` value is specified, `MASTER_POS_WAIT()` stops waiting when `timeout` seconds have elapsed. `timeout` must be greater than 0; a zero or negative `timeout` means no `timeout`.
2222

0 commit comments

Comments
 (0)