Skip to content

Commit 2a48490

Browse files
Andre Negraorashik-bhasin
authored andcommitted
Added - Support for MySQL MDS Outbound replication added
1 parent b14d050 commit 2a48490

File tree

5 files changed

+52
-2
lines changed

5 files changed

+52
-2
lines changed

oci/mysql_mysql_configuration_data_source.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,21 @@ func MysqlMysqlConfigurationDataSource() *schema.Resource {
8888
Optional: true,
8989
Computed: true,
9090
},
91+
"binlog_row_metadata": {
92+
Type: schema.TypeString,
93+
Optional: true,
94+
Computed: true,
95+
},
96+
"binlog_row_value_options": {
97+
Type: schema.TypeString,
98+
Optional: true,
99+
Computed: true,
100+
},
101+
"binlog_transaction_compression": {
102+
Type: schema.TypeBool,
103+
Optional: true,
104+
Computed: true,
105+
},
91106
"completion_type": {
92107
Type: schema.TypeString,
93108
Optional: true,
@@ -446,6 +461,16 @@ func ConfigurationVariablesToMap(obj *oci_mysql.ConfigurationVariables) map[stri
446461
result["binlog_expire_logs_seconds"] = int(*obj.BinlogExpireLogsSeconds)
447462
}
448463

464+
result["binlog_row_metadata"] = string(obj.BinlogRowMetadata)
465+
466+
if obj.BinlogRowValueOptions != nil {
467+
result["binlog_row_value_options"] = string(*obj.BinlogRowValueOptions)
468+
}
469+
470+
if obj.BinlogTransactionCompression != nil {
471+
result["binlog_transaction_compression"] = bool(*obj.BinlogTransactionCompression)
472+
}
473+
449474
result["completion_type"] = string(obj.CompletionType)
450475

451476
if obj.ConnectTimeout != nil {

oci/mysql_mysql_configuration_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ func TestMysqlMysqlConfigurationResource_basic(t *testing.T) {
8484
resource.TestCheckResourceAttrSet(singularDatasourceName, "type"),
8585
resource.TestCheckResourceAttr(singularDatasourceName, "variables.#", "1"),
8686
resource.TestCheckResourceAttr(singularDatasourceName, "variables.0.autocommit", "false"),
87+
resource.TestCheckResourceAttr(singularDatasourceName, "variables.0.binlog_expire_logs_seconds", "3600"),
88+
resource.TestCheckResourceAttr(singularDatasourceName, "variables.0.binlog_row_metadata", ""),
89+
resource.TestCheckResourceAttr(singularDatasourceName, "variables.0.binlog_row_value_options", "PARTIAL_JSON"),
90+
resource.TestCheckResourceAttr(singularDatasourceName, "variables.0.binlog_transaction_compression", "false"),
8791
resource.TestCheckResourceAttr(singularDatasourceName, "variables.0.completion_type", ""),
8892
resource.TestCheckResourceAttr(singularDatasourceName, "variables.0.connect_timeout", "0"),
8993
resource.TestCheckResourceAttr(singularDatasourceName, "variables.0.cte_max_recursion_depth", "0"),

oci/mysql_mysql_configurations_data_source.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,21 @@ func MysqlMysqlConfigurationsDataSource() *schema.Resource {
111111
Optional: true,
112112
Computed: true,
113113
},
114+
"binlog_row_metadata": {
115+
Type: schema.TypeString,
116+
Optional: true,
117+
Computed: true,
118+
},
119+
"binlog_row_value_options": {
120+
Type: schema.TypeString,
121+
Optional: true,
122+
Computed: true,
123+
},
124+
"binlog_transaction_compression": {
125+
Type: schema.TypeBool,
126+
Optional: true,
127+
Computed: true,
128+
},
114129
"completion_type": {
115130
Type: schema.TypeString,
116131
Optional: true,

website/docs/d/mysql_mysql_configuration.html.markdown

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ The following attributes are exported:
4747
* `type` - The Configuration type, DEFAULT or CUSTOM.
4848
* `variables` - User controllable service variables.
4949
* `autocommit` - ("autocommit")
50-
* `binlog_expire_logs_seconds` - ("binlog_expire_logs_seconds") DEPRECATED -- variable should not be settable and will be ignored
50+
* `binlog_expire_logs_seconds` - Sets the binary log expiration period in seconds. binlogExpireLogsSeconds corresponds to the MySQL binary logging system variable [binlog_expire_logs_seconds](https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_expire_logs_seconds).
51+
* `binlog_row_metadata` - Configures the amount of table metadata added to the binary log when using row-based logging. binlogRowMetadata corresponds to the MySQL binary logging system variable [binlog_row_metadata](https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_row_metadata).
52+
* `binlog_row_value_options` - When set to PARTIAL_JSON, this enables use of a space-efficient binary log format for updates that modify only a small portion of a JSON document. binlogRowValueOptions corresponds to the MySQL binary logging system variable [binlog_row_value_options](https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_row_value_options).
53+
* `binlog_transaction_compression` - Enables compression for transactions that are written to binary log files on this server. binlogTransactionCompression corresponds to the MySQL binary logging system variable [binlog_transaction_compression](https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_transaction_compression).
5154
* `completion_type` - ("completion_type")
5255
* `connect_timeout` - ("connect_timeout")
5356
* `cte_max_recursion_depth` - ("cte_max_recursion_depth")

website/docs/d/mysql_mysql_configurations.html.markdown

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ The following attributes are exported:
7272
* `type` - The Configuration type, DEFAULT or CUSTOM.
7373
* `variables` - User controllable service variables.
7474
* `autocommit` - ("autocommit")
75-
* `binlog_expire_logs_seconds` - ("binlog_expire_logs_seconds") DEPRECATED -- variable should not be settable and will be ignored
75+
* `binlog_expire_logs_seconds` - Sets the binary log expiration period in seconds. binlogExpireLogsSeconds corresponds to the MySQL binary logging system variable [binlog_expire_logs_seconds](https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_expire_logs_seconds).
76+
* `binlog_row_metadata` - Configures the amount of table metadata added to the binary log when using row-based logging. binlogRowMetadata corresponds to the MySQL binary logging system variable [binlog_row_metadata](https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_row_metadata).
77+
* `binlog_row_value_options` - When set to PARTIAL_JSON, this enables use of a space-efficient binary log format for updates that modify only a small portion of a JSON document. binlogRowValueOptions corresponds to the MySQL binary logging system variable [binlog_row_value_options](https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_row_value_options).
78+
* `binlog_transaction_compression` - Enables compression for transactions that are written to binary log files on this server. binlogTransactionCompression corresponds to the MySQL binary logging system variable [binlog_transaction_compression](https://dev.mysql.com/doc/refman/8.0/en/replication-options-binary-log.html#sysvar_binlog_transaction_compression).
7679
* `completion_type` - ("completion_type")
7780
* `connect_timeout` - ("connect_timeout")
7881
* `cte_max_recursion_depth` - ("cte_max_recursion_depth")

0 commit comments

Comments
 (0)