@@ -226,10 +226,10 @@ void initialize_channel_connection_info(Channel_connection_info *channel_info) {
226
226
channel_info->view_id = nullptr ;
227
227
}
228
228
229
- static void set_mi_ssl_options (LEX_MASTER_INFO *lex_mi,
229
+ static void set_mi_ssl_options (LEX_SOURCE_INFO *lex_mi,
230
230
Channel_ssl_info *channel_ssl_info) {
231
- lex_mi->ssl = (channel_ssl_info->use_ssl ) ? LEX_MASTER_INFO ::LEX_MI_ENABLE
232
- : LEX_MASTER_INFO ::LEX_MI_DISABLE;
231
+ lex_mi->ssl = (channel_ssl_info->use_ssl ) ? LEX_SOURCE_INFO ::LEX_MI_ENABLE
232
+ : LEX_SOURCE_INFO ::LEX_MI_DISABLE;
233
233
234
234
if (channel_ssl_info->ssl_ca_file_name != nullptr ) {
235
235
lex_mi->ssl_ca = channel_ssl_info->ssl_ca_file_name ;
@@ -264,23 +264,23 @@ static void set_mi_ssl_options(LEX_MASTER_INFO *lex_mi,
264
264
}
265
265
266
266
if (channel_ssl_info->tls_ciphersuites != nullptr ) {
267
- lex_mi->tls_ciphersuites = LEX_MASTER_INFO ::SPECIFIED_STRING;
267
+ lex_mi->tls_ciphersuites = LEX_SOURCE_INFO ::SPECIFIED_STRING;
268
268
lex_mi->tls_ciphersuites_string = channel_ssl_info->tls_ciphersuites ;
269
269
} else {
270
- lex_mi->tls_ciphersuites = LEX_MASTER_INFO ::SPECIFIED_NULL;
270
+ lex_mi->tls_ciphersuites = LEX_SOURCE_INFO ::SPECIFIED_NULL;
271
271
}
272
272
273
273
lex_mi->ssl_verify_server_cert = (channel_ssl_info->ssl_verify_server_cert )
274
- ? LEX_MASTER_INFO ::LEX_MI_ENABLE
275
- : LEX_MASTER_INFO ::LEX_MI_DISABLE;
274
+ ? LEX_SOURCE_INFO ::LEX_MI_ENABLE
275
+ : LEX_SOURCE_INFO ::LEX_MI_DISABLE;
276
276
}
277
277
278
278
int channel_create (const char *channel, Channel_creation_info *channel_info) {
279
279
DBUG_TRACE;
280
280
281
281
Master_info *mi = nullptr ;
282
282
int error = 0 ;
283
- LEX_MASTER_INFO *lex_mi = nullptr ;
283
+ LEX_SOURCE_INFO *lex_mi = nullptr ;
284
284
285
285
bool thd_created = false ;
286
286
THD *thd = current_thd;
@@ -306,32 +306,32 @@ int channel_create(const char *channel, Channel_creation_info *channel_info) {
306
306
if ((error = add_new_channel (&mi, channel))) goto err;
307
307
}
308
308
309
- lex_mi = new LEX_MASTER_INFO ();
309
+ lex_mi = new LEX_SOURCE_INFO ();
310
310
lex_mi->channel = channel;
311
311
lex_mi->host = channel_info->hostname ;
312
312
/*
313
313
'group_replication_recovery' channel (*after recovery is done*)
314
314
or 'group_replication_applier' channel wants to set the port number
315
315
to '0' as there is no actual network usage on these channels.
316
316
*/
317
- lex_mi->port_opt = LEX_MASTER_INFO ::LEX_MI_ENABLE;
317
+ lex_mi->port_opt = LEX_SOURCE_INFO ::LEX_MI_ENABLE;
318
318
lex_mi->port = channel_info->port ;
319
319
lex_mi->user = channel_info->user ;
320
320
lex_mi->password = channel_info->password ;
321
321
lex_mi->sql_delay = channel_info->sql_delay ;
322
322
lex_mi->connect_retry = channel_info->connect_retry ;
323
323
if (channel_info->retry_count ) {
324
- lex_mi->retry_count_opt = LEX_MASTER_INFO ::LEX_MI_ENABLE;
324
+ lex_mi->retry_count_opt = LEX_SOURCE_INFO ::LEX_MI_ENABLE;
325
325
lex_mi->retry_count = channel_info->retry_count ;
326
326
}
327
327
328
328
if (channel_info->auto_position ) {
329
- lex_mi->auto_position = LEX_MASTER_INFO ::LEX_MI_ENABLE;
329
+ lex_mi->auto_position = LEX_SOURCE_INFO ::LEX_MI_ENABLE;
330
330
if ((mi && mi->is_auto_position ()) ||
331
331
channel_info->auto_position == RPL_SERVICE_SERVER_DEFAULT) {
332
332
// So change replication source allows new configurations with a running
333
333
// SQL thread
334
- lex_mi->auto_position = LEX_MASTER_INFO ::LEX_MI_UNCHANGED;
334
+ lex_mi->auto_position = LEX_SOURCE_INFO ::LEX_MI_UNCHANGED;
335
335
}
336
336
}
337
337
@@ -340,18 +340,18 @@ int channel_create(const char *channel, Channel_creation_info *channel_info) {
340
340
}
341
341
342
342
if (channel_info->get_public_key ) {
343
- lex_mi->get_public_key = LEX_MASTER_INFO ::LEX_MI_ENABLE;
343
+ lex_mi->get_public_key = LEX_SOURCE_INFO ::LEX_MI_ENABLE;
344
344
if (mi && mi->get_public_key ) {
345
345
// So change replication source allows new configurations with a running
346
346
// SQL thread
347
- lex_mi->get_public_key = LEX_MASTER_INFO ::LEX_MI_UNCHANGED;
347
+ lex_mi->get_public_key = LEX_SOURCE_INFO ::LEX_MI_UNCHANGED;
348
348
}
349
349
} else {
350
- lex_mi->get_public_key = LEX_MASTER_INFO ::LEX_MI_DISABLE;
350
+ lex_mi->get_public_key = LEX_SOURCE_INFO ::LEX_MI_DISABLE;
351
351
if (mi && !mi->get_public_key ) {
352
352
// So change replication source allows new configurations with a running
353
353
// SQL thread
354
- lex_mi->get_public_key = LEX_MASTER_INFO ::LEX_MI_UNCHANGED;
354
+ lex_mi->get_public_key = LEX_SOURCE_INFO ::LEX_MI_UNCHANGED;
355
355
}
356
356
}
357
357
@@ -362,16 +362,16 @@ int channel_create(const char *channel, Channel_creation_info *channel_info) {
362
362
lex_mi->zstd_compression_level = channel_info->zstd_compression_level ;
363
363
}
364
364
365
- lex_mi->m_source_connection_auto_failover = LEX_MASTER_INFO ::LEX_MI_UNCHANGED;
365
+ lex_mi->m_source_connection_auto_failover = LEX_SOURCE_INFO ::LEX_MI_UNCHANGED;
366
366
if (channel_info->m_source_connection_auto_failover ) {
367
367
if (mi && !mi->is_source_connection_auto_failover ()) {
368
368
lex_mi->m_source_connection_auto_failover =
369
- LEX_MASTER_INFO ::LEX_MI_ENABLE;
369
+ LEX_SOURCE_INFO ::LEX_MI_ENABLE;
370
370
}
371
371
} else {
372
372
if (mi && mi->is_source_connection_auto_failover ()) {
373
373
lex_mi->m_source_connection_auto_failover =
374
- LEX_MASTER_INFO ::LEX_MI_DISABLE;
374
+ LEX_SOURCE_INFO ::LEX_MI_DISABLE;
375
375
}
376
376
}
377
377
@@ -418,7 +418,7 @@ int channel_start(const char *channel, Channel_connection_info *connection_info,
418
418
DBUG_TRACE;
419
419
int error = 0 ;
420
420
int thread_mask = 0 ;
421
- LEX_MASTER_INFO lex_mi;
421
+ LEX_SOURCE_INFO lex_mi;
422
422
ulong thread_start_id = 0 ;
423
423
bool thd_created = false ;
424
424
THD *thd = current_thd;
@@ -445,16 +445,16 @@ int channel_start(const char *channel, Channel_connection_info *connection_info,
445
445
}
446
446
447
447
if (threads_to_start & CHANNEL_APPLIER_THREAD) {
448
- thread_mask |= SLAVE_SQL ;
448
+ thread_mask |= REPLICA_SQL ;
449
449
}
450
450
if (threads_to_start & CHANNEL_RECEIVER_THREAD) {
451
- thread_mask |= SLAVE_IO ;
451
+ thread_mask |= REPLICA_IO ;
452
452
}
453
453
454
454
// Nothing to be done here
455
455
if (!thread_mask) goto err;
456
456
457
- LEX_SLAVE_CONNECTION lex_connection;
457
+ LEX_REPLICA_CONNECTION lex_connection;
458
458
lex_connection.reset ();
459
459
460
460
if (!Rpl_channel_credentials::get_instance ().get_credentials (channel, user,
@@ -470,26 +470,26 @@ int channel_start(const char *channel, Channel_connection_info *connection_info,
470
470
if (connection_info->until_condition != CHANNEL_NO_UNTIL_CONDITION) {
471
471
switch (connection_info->until_condition ) {
472
472
case CHANNEL_UNTIL_APPLIER_AFTER_GTIDS:
473
- lex_mi.gtid_until_condition = LEX_MASTER_INFO ::UNTIL_SQL_AFTER_GTIDS;
473
+ lex_mi.gtid_until_condition = LEX_SOURCE_INFO ::UNTIL_SQL_AFTER_GTIDS;
474
474
lex_mi.gtid = connection_info->gtid ;
475
475
break ;
476
476
case CHANNEL_UNTIL_APPLIER_BEFORE_GTIDS:
477
- lex_mi.gtid_until_condition = LEX_MASTER_INFO ::UNTIL_SQL_BEFORE_GTIDS;
477
+ lex_mi.gtid_until_condition = LEX_SOURCE_INFO ::UNTIL_SQL_BEFORE_GTIDS;
478
478
lex_mi.gtid = connection_info->gtid ;
479
479
break ;
480
480
case CHANNEL_UNTIL_APPLIER_AFTER_GAPS:
481
481
lex_mi.until_after_gaps = true ;
482
482
break ;
483
483
case CHANNEL_UNTIL_VIEW_ID:
484
- assert ((thread_mask & SLAVE_SQL ) && connection_info->view_id );
484
+ assert ((thread_mask & REPLICA_SQL ) && connection_info->view_id );
485
485
lex_mi.view_id = connection_info->view_id ;
486
486
break ;
487
487
default :
488
488
assert (0 );
489
489
}
490
490
}
491
491
492
- if (wait_for_connection && (thread_mask & SLAVE_IO ))
492
+ if (wait_for_connection && (thread_mask & REPLICA_IO ))
493
493
thread_start_id = mi->slave_run_id ;
494
494
495
495
if (!thd) {
@@ -500,7 +500,7 @@ int channel_start(const char *channel, Channel_connection_info *connection_info,
500
500
error = start_slave (thd, &lex_connection, &lex_mi, thread_mask, mi,
501
501
use_server_mta_configuration);
502
502
503
- if (wait_for_connection && (thread_mask & SLAVE_IO ) && !error) {
503
+ if (wait_for_connection && (thread_mask & REPLICA_IO ) && !error) {
504
504
mysql_mutex_lock (&mi->run_lock );
505
505
/*
506
506
If the ids are still equal this means the start thread method did not
@@ -551,12 +551,12 @@ int channel_stop(Master_info *mi, int threads_to_stop, long timeout) {
551
551
init_thread_mask (&server_thd_mask, mi, false /* not inverse*/ );
552
552
553
553
if ((threads_to_stop & CHANNEL_APPLIER_THREAD) &&
554
- (server_thd_mask & SLAVE_SQL )) {
555
- thread_mask |= SLAVE_SQL ;
554
+ (server_thd_mask & REPLICA_SQL )) {
555
+ thread_mask |= REPLICA_SQL ;
556
556
}
557
557
if ((threads_to_stop & CHANNEL_RECEIVER_THREAD) &&
558
- (server_thd_mask & SLAVE_IO )) {
559
- thread_mask |= SLAVE_IO ;
558
+ (server_thd_mask & REPLICA_IO )) {
559
+ thread_mask |= REPLICA_IO ;
560
560
}
561
561
if ((threads_to_stop & CHANNEL_RECEIVER_THREAD) &&
562
562
(server_thd_mask & SLAVE_MONITOR)) {
@@ -716,9 +716,9 @@ bool channel_is_active(const char *channel,
716
716
case CHANNEL_NO_THD:
717
717
return true ; // return true as the channel exists
718
718
case CHANNEL_RECEIVER_THREAD:
719
- return thread_mask & SLAVE_IO ;
719
+ return thread_mask & REPLICA_IO ;
720
720
case CHANNEL_APPLIER_THREAD:
721
- return thread_mask & SLAVE_SQL ;
721
+ return thread_mask & REPLICA_SQL ;
722
722
default :
723
723
assert (0 );
724
724
}
@@ -1206,7 +1206,7 @@ bool is_any_slave_channel_running(int thread_mask) {
1206
1206
mi = it->second ;
1207
1207
1208
1208
if (mi) {
1209
- if ((thread_mask & SLAVE_IO ) != 0 ) {
1209
+ if ((thread_mask & REPLICA_IO ) != 0 ) {
1210
1210
mysql_mutex_lock (&mi->run_lock );
1211
1211
is_running = mi->slave_running ;
1212
1212
mysql_mutex_unlock (&mi->run_lock );
@@ -1216,7 +1216,7 @@ bool is_any_slave_channel_running(int thread_mask) {
1216
1216
}
1217
1217
}
1218
1218
1219
- if ((thread_mask & SLAVE_SQL ) != 0 ) {
1219
+ if ((thread_mask & REPLICA_SQL ) != 0 ) {
1220
1220
mysql_mutex_lock (&mi->rli ->run_lock );
1221
1221
is_running = mi->rli ->slave_running ;
1222
1222
mysql_mutex_unlock (&mi->rli ->run_lock );
@@ -1245,7 +1245,7 @@ bool is_any_slave_channel_running_with_failover_enabled(int thread_mask) {
1245
1245
1246
1246
if (mi && Master_info::is_configured (mi) &&
1247
1247
mi->is_source_connection_auto_failover ()) {
1248
- if ((thread_mask & SLAVE_IO ) != 0 ) {
1248
+ if ((thread_mask & REPLICA_IO ) != 0 ) {
1249
1249
mysql_mutex_lock (&mi->run_lock );
1250
1250
is_running = mi->slave_running ;
1251
1251
mysql_mutex_unlock (&mi->run_lock );
@@ -1255,7 +1255,7 @@ bool is_any_slave_channel_running_with_failover_enabled(int thread_mask) {
1255
1255
}
1256
1256
}
1257
1257
1258
- if ((thread_mask & SLAVE_SQL ) != 0 ) {
1258
+ if ((thread_mask & REPLICA_SQL ) != 0 ) {
1259
1259
mysql_mutex_lock (&mi->rli ->run_lock );
1260
1260
is_running = mi->rli ->slave_running ;
1261
1261
mysql_mutex_unlock (&mi->rli ->run_lock );
0 commit comments