Skip to content

Commit db174bd

Browse files
committed
WL#7491: GTID-based replication applier recovery and positioning
Step 2: Add info to performance schema ReviewBoard: 26587
1 parent 5042515 commit db174bd

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,7 @@ def performance_schema replication_connection_configuration COMPRESSION_ALGORITH
10801080
def performance_schema replication_connection_configuration ZSTD_COMPRESSION_LEVEL 24 NULL NO int NULL NULL 10 0 NULL NULL NULL int select,insert,update,references Compression level associated with zstd compression algorithm. NULL
10811081
def performance_schema replication_connection_configuration TLS_CIPHERSUITES 25 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references NULL
10821082
def performance_schema replication_connection_configuration SOURCE_CONNECTION_AUTO_FAILOVER 26 NULL NO enum 1 4 NULL NULL NULL utf8mb4 utf8mb4_0900_ai_ci enum('1','0') select,insert,update,references NULL
1083+
def performance_schema replication_connection_configuration GTID_ONLY 27 NULL NO enum 1 4 NULL NULL NULL utf8mb4 utf8mb4_0900_ai_ci enum('1','0') select,insert,update,references Indicates if this channel only uses GTIDs and does not persist positions. NULL
10831084
def performance_schema replication_connection_status CHANNEL_NAME 1 NULL NO char 64 256 NULL NULL NULL utf8mb4 utf8mb4_0900_ai_ci char(64) PRI select,insert,update,references NULL
10841085
def performance_schema replication_connection_status GROUP_NAME 2 NULL NO char 36 144 NULL NULL NULL utf8mb4 utf8mb4_bin char(36) select,insert,update,references NULL
10851086
def performance_schema replication_connection_status SOURCE_UUID 3 NULL NO char 36 144 NULL NULL NULL utf8mb4 utf8mb4_bin char(36) 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
@@ -99,7 +99,7 @@ insert into test.pfs_published_schema
9999

100100
insert into test.pfs_published_schema
101101
values("MySQL 8.0.27",
102-
"a66d1db33b2ab8d90ffc33461f01b3434ece6deedcba74633eb864ba21349476");
102+
"cfd644328ffe35ab2d82c378c05a879a430abeccfe4025204767c5d56211e822");
103103

104104
create table test.pfs_check_table
105105
(id int NOT NULL AUTO_INCREMENT,

storage/perfschema/pfs_dd_version.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@
180180
MEMBER_COMMUNICATION_PROTOCOL_STACK
181181
- Bug#32701593:'SELECT FROM
182182
PS.REPLICATION_ASYNCHRONOUS_CONNECTION_FAILOVER' DIDN'T RETURN A RE
183-
183+
- WL#7491 added the column to replication_connection_configuration
184+
the column GTID_ONLY
184185
*/
185186

186187
static const uint PFS_DD_VERSION = 80027;

storage/perfschema/table_replication_connection_configuration.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ Plugin_table table_replication_connection_configuration::m_table_def(
8282
"algorithm.',\n"
8383
" TLS_CIPHERSUITES TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL,\n"
8484
" SOURCE_CONNECTION_AUTO_FAILOVER ENUM('1','0') not null,\n"
85+
" GTID_ONLY ENUM('1','0') not null\n"
86+
" COMMENT 'Indicates if this channel only uses GTIDs and does not persist "
87+
"positions.',\n"
8588
" PRIMARY KEY (channel_name) USING HASH\n",
8689
/* Options */
8790
" ENGINE=PERFORMANCE_SCHEMA",
@@ -321,6 +324,8 @@ int table_replication_connection_configuration::make_row(Master_info *mi) {
321324
m_row.source_connection_auto_failover = PS_RPL_NO;
322325
}
323326

327+
m_row.gtid_only = mi->is_gtid_only_mode() ? PS_RPL_YES : PS_RPL_NO;
328+
324329
mysql_mutex_unlock(&mi->rli->data_lock);
325330
mysql_mutex_unlock(&mi->data_lock);
326331

@@ -430,6 +435,9 @@ int table_replication_connection_configuration::read_row_values(
430435
case 25: /** source_connection_auto_failover */
431436
set_field_enum(f, m_row.source_connection_auto_failover);
432437
break;
438+
case 26: /** gtid_only */
439+
set_field_enum(f, m_row.gtid_only);
440+
break;
433441
default:
434442
assert(false);
435443
}

storage/perfschema/table_replication_connection_configuration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ struct st_row_connect_config {
115115
*/
116116
std::pair<bool, std::string> tls_ciphersuites = {true, ""};
117117
enum_rpl_yes_no source_connection_auto_failover{PS_RPL_NO};
118+
/*PS_RPL_NO if gtid_only is disabled, PS_RPL_YES if enabled */
119+
enum_rpl_yes_no gtid_only{PS_RPL_NO};
118120
};
119121

120122
class PFS_index_rpl_connection_config : public PFS_engine_index {

0 commit comments

Comments
 (0)