Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ type MySQLDatabase struct {
type MySQLDatabaseEngineConfig struct {
MySQL *MySQLDatabaseEngineConfigMySQL `json:"mysql,omitempty"`
BinlogRetentionPeriod *int `json:"binlog_retention_period,omitempty"`
ServiceLog *bool `json:"service_log,omitempty"`
}

type MySQLDatabaseEngineConfigMySQL struct {
Expand All @@ -72,21 +71,17 @@ type MySQLDatabaseEngineConfigMySQL struct {
InnoDBLockWaitTimeout *int `json:"innodb_lock_wait_timeout,omitempty"`
InnoDBLogBufferSize *int `json:"innodb_log_buffer_size,omitempty"`
InnoDBOnlineAlterLogMaxSize *int `json:"innodb_online_alter_log_max_size,omitempty"`
InnoDBPrintAllDeadlocks *bool `json:"innodb_print_all_deadlocks,omitempty"`
InnoDBReadIOThreads *int `json:"innodb_read_io_threads,omitempty"`
InnoDBRollbackOnTimeout *bool `json:"innodb_rollback_on_timeout,omitempty"`
InnoDBThreadConcurrency *int `json:"innodb_thread_concurrency,omitempty"`
InnoDBWriteIOThreads *int `json:"innodb_write_io_threads,omitempty"`
InteractiveTimeout *int `json:"interactive_timeout,omitempty"`
InternalTmpMemStorageEngine *string `json:"internal_tmp_mem_storage_engine,omitempty"`
LogOutput *string `json:"log_output,omitempty"`
LongQueryTime *float64 `json:"long_query_time,omitempty"`
MaxAllowedPacket *int `json:"max_allowed_packet,omitempty"`
MaxHeapTableSize *int `json:"max_heap_table_size,omitempty"`
NetBufferLength *int `json:"net_buffer_length,omitempty"`
NetReadTimeout *int `json:"net_read_timeout,omitempty"`
NetWriteTimeout *int `json:"net_write_timeout,omitempty"`
SlowQueryLog *bool `json:"slow_query_log,omitempty"`
SortBufferSize *int `json:"sort_buffer_size,omitempty"`
SQLMode *string `json:"sql_mode,omitempty"`
SQLRequirePrimaryKey *bool `json:"sql_require_primary_key,omitempty"`
Expand All @@ -97,7 +92,6 @@ type MySQLDatabaseEngineConfigMySQL struct {
type MySQLDatabaseConfigInfo struct {
MySQL MySQLDatabaseConfigInfoMySQL `json:"mysql"`
BinlogRetentionPeriod MySQLDatabaseConfigInfoBinlogRetentionPeriod `json:"binlog_retention_period"`
ServiceLog MySQLDatabaseConfigInfoServiceLog `json:"service_log"`
}

type MySQLDatabaseConfigInfoMySQL struct {
Expand All @@ -112,21 +106,17 @@ type MySQLDatabaseConfigInfoMySQL struct {
InnoDBLockWaitTimeout InnoDBLockWaitTimeout `json:"innodb_lock_wait_timeout"`
InnoDBLogBufferSize InnoDBLogBufferSize `json:"innodb_log_buffer_size"`
InnoDBOnlineAlterLogMaxSize InnoDBOnlineAlterLogMaxSize `json:"innodb_online_alter_log_max_size"`
InnoDBPrintAllDeadlocks InnoDBPrintAllDeadlocks `json:"innodb_print_all_deadlocks"`
InnoDBReadIOThreads InnoDBReadIOThreads `json:"innodb_read_io_threads"`
InnoDBRollbackOnTimeout InnoDBRollbackOnTimeout `json:"innodb_rollback_on_timeout"`
InnoDBThreadConcurrency InnoDBThreadConcurrency `json:"innodb_thread_concurrency"`
InnoDBWriteIOThreads InnoDBWriteIOThreads `json:"innodb_write_io_threads"`
InteractiveTimeout InteractiveTimeout `json:"interactive_timeout"`
InternalTmpMemStorageEngine InternalTmpMemStorageEngine `json:"internal_tmp_mem_storage_engine"`
LogOutput LogOutput `json:"log_output"`
LongQueryTime LongQueryTime `json:"long_query_time"`
MaxAllowedPacket MaxAllowedPacket `json:"max_allowed_packet"`
MaxHeapTableSize MaxHeapTableSize `json:"max_heap_table_size"`
NetBufferLength NetBufferLength `json:"net_buffer_length"`
NetReadTimeout NetReadTimeout `json:"net_read_timeout"`
NetWriteTimeout NetWriteTimeout `json:"net_write_timeout"`
SlowQueryLog SlowQueryLog `json:"slow_query_log"`
SortBufferSize SortBufferSize `json:"sort_buffer_size"`
SQLMode SQLMode `json:"sql_mode"`
SQLRequirePrimaryKey SQLRequirePrimaryKey `json:"sql_require_primary_key"`
Expand Down Expand Up @@ -234,13 +224,6 @@ type InnoDBOnlineAlterLogMaxSize struct {
Type string `json:"type"`
}

type InnoDBPrintAllDeadlocks struct {
Description string `json:"description"`
Example bool `json:"example"`
RequiresRestart bool `json:"requires_restart"`
Type string `json:"type"`
}

type InnoDBReadIOThreads struct {
Description string `json:"description"`
Example int `json:"example"`
Expand Down Expand Up @@ -292,23 +275,6 @@ type InternalTmpMemStorageEngine struct {
Type string `json:"type"`
}

type LogOutput struct {
Description string `json:"description"`
Enum []string `json:"enum"`
Example string `json:"example"`
RequiresRestart bool `json:"requires_restart"`
Type string `json:"type"`
}

type LongQueryTime struct {
Description string `json:"description"`
Example float64 `json:"example"`
Maximum float64 `json:"maximum"`
Minimum float64 `json:"minimum"`
RequiresRestart bool `json:"requires_restart"`
Type string `json:"type"`
}

type MaxAllowedPacket struct {
Description string `json:"description"`
Example int `json:"example"`
Expand Down Expand Up @@ -354,13 +320,6 @@ type NetWriteTimeout struct {
Type string `json:"type"`
}

type SlowQueryLog struct {
Description string `json:"description"`
Example bool `json:"example"`
RequiresRestart bool `json:"requires_restart"`
Type string `json:"type"`
}

type SortBufferSize struct {
Description string `json:"description"`
Example int `json:"example"`
Expand Down Expand Up @@ -413,13 +372,6 @@ type MySQLDatabaseConfigInfoBinlogRetentionPeriod struct {
Type string `json:"type"`
}

type MySQLDatabaseConfigInfoServiceLog struct {
Description string `json:"description"`
Example bool `json:"example"`
RequiresRestart bool `json:"requires_restart"`
Type []string `json:"type"`
}

func (d *MySQLDatabase) UnmarshalJSON(b []byte) error {
type Mask MySQLDatabase

Expand Down
88 changes: 0 additions & 88 deletions postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,13 @@ type PostgresDatabaseEngineConfig struct {
PG *PostgresDatabaseEngineConfigPG `json:"pg,omitempty"`
PGStatMonitorEnable *bool `json:"pg_stat_monitor_enable,omitempty"`
PGLookout *PostgresDatabaseEngineConfigPGLookout `json:"pglookout,omitempty"`
ServiceLog *bool `json:"service_log,omitempty"`
SharedBuffersPercentage *float64 `json:"shared_buffers_percentage,omitempty"`
SynchronousReplication *string `json:"synchronous_replication,omitempty"`
WorkMem *int `json:"work_mem,omitempty"`
}

type PostgresDatabaseEngineConfigPG struct {
AutovacuumAnalyzeScaleFactor *float64 `json:"autovacuum_analyze_scale_factor,omitempty"`
AutovacuumAnalyzeThreshold *int32 `json:"autovacuum_analyze_threshold,omitempty"`
AutovacuumFreezeMaxAge *int `json:"autovacuum_freeze_max_age,omitempty"`
AutovacuumMaxWorkers *int `json:"autovacuum_max_workers,omitempty"`
AutovacuumNaptime *int `json:"autovacuum_naptime,omitempty"`
AutovacuumVacuumCostDelay *int `json:"autovacuum_vacuum_cost_delay,omitempty"`
Expand All @@ -99,18 +96,12 @@ type PostgresDatabaseEngineConfigPG struct {
DefaultToastCompression *string `json:"default_toast_compression,omitempty"`
IdleInTransactionSessionTimeout *int `json:"idle_in_transaction_session_timeout,omitempty"`
JIT *bool `json:"jit,omitempty"`
LogAutovacuumMinDuration *int32 `json:"log_autovacuum_min_duration,omitempty"`
LogErrorVerbosity *string `json:"log_error_verbosity,omitempty"`
LogLinePrefix *string `json:"log_line_prefix,omitempty"`
LogMinDurationStatement *int `json:"log_min_duration_statement,omitempty"`
LogTempFiles *int32 `json:"log_temp_files,omitempty"`
MaxFilesPerProcess *int `json:"max_files_per_process,omitempty"`
MaxLocksPerTransaction *int `json:"max_locks_per_transaction,omitempty"`
MaxLogicalReplicationWorkers *int `json:"max_logical_replication_workers,omitempty"`
MaxParallelWorkers *int `json:"max_parallel_workers,omitempty"`
MaxParallelWorkersPerGather *int `json:"max_parallel_workers_per_gather,omitempty"`
MaxPredLocksPerTransaction *int `json:"max_pred_locks_per_transaction,omitempty"`
MaxPreparedTransactions *int `json:"max_prepared_transactions,omitempty"`
MaxReplicationSlots *int `json:"max_replication_slots,omitempty"`
MaxSlotWALKeepSize *int32 `json:"max_slot_wal_keep_size,omitempty"`
MaxStackDepth *int `json:"max_stack_depth,omitempty"`
Expand Down Expand Up @@ -142,16 +133,13 @@ type PostgresDatabaseConfigInfo struct {
PG PostgresDatabaseConfigInfoPG `json:"pg"`
PGStatMonitorEnable PostgresDatabaseConfigInfoPGStatMonitorEnable `json:"pg_stat_monitor_enable"`
PGLookout PostgresDatabaseConfigInfoPGLookout `json:"pglookout"`
ServiceLog PostgresDatabaseConfigInfoServiceLog `json:"service_log"`
SharedBuffersPercentage PostgresDatabaseConfigInfoSharedBuffersPercentage `json:"shared_buffers_percentage"`
SynchronousReplication PostgresDatabaseConfigInfoSynchronousReplication `json:"synchronous_replication"`
WorkMem PostgresDatabaseConfigInfoWorkMem `json:"work_mem"`
}

type PostgresDatabaseConfigInfoPG struct {
AutovacuumAnalyzeScaleFactor AutovacuumAnalyzeScaleFactor `json:"autovacuum_analyze_scale_factor"`
AutovacuumAnalyzeThreshold AutovacuumAnalyzeThreshold `json:"autovacuum_analyze_threshold"`
AutovacuumFreezeMaxAge AutovacuumFreezeMaxAge `json:"autovacuum_freeze_max_age"`
AutovacuumMaxWorkers AutovacuumMaxWorkers `json:"autovacuum_max_workers"`
AutovacuumNaptime AutovacuumNaptime `json:"autovacuum_naptime"`
AutovacuumVacuumCostDelay AutovacuumVacuumCostDelay `json:"autovacuum_vacuum_cost_delay"`
Expand All @@ -166,18 +154,12 @@ type PostgresDatabaseConfigInfoPG struct {
DefaultToastCompression DefaultToastCompression `json:"default_toast_compression"`
IdleInTransactionSessionTimeout IdleInTransactionSessionTimeout `json:"idle_in_transaction_session_timeout"`
JIT JIT `json:"jit"`
LogAutovacuumMinDuration LogAutovacuumMinDuration `json:"log_autovacuum_min_duration"`
LogErrorVerbosity LogErrorVerbosity `json:"log_error_verbosity"`
LogLinePrefix LogLinePrefix `json:"log_line_prefix"`
LogMinDurationStatement LogMinDurationStatement `json:"log_min_duration_statement"`
LogTempFiles LogTempFiles `json:"log_temp_files"`
MaxFilesPerProcess MaxFilesPerProcess `json:"max_files_per_process"`
MaxLocksPerTransaction MaxLocksPerTransaction `json:"max_locks_per_transaction"`
MaxLogicalReplicationWorkers MaxLogicalReplicationWorkers `json:"max_logical_replication_workers"`
MaxParallelWorkers MaxParallelWorkers `json:"max_parallel_workers"`
MaxParallelWorkersPerGather MaxParallelWorkersPerGather `json:"max_parallel_workers_per_gather"`
MaxPredLocksPerTransaction MaxPredLocksPerTransaction `json:"max_pred_locks_per_transaction"`
MaxPreparedTransactions MaxPreparedTransactions `json:"max_prepared_transactions"`
MaxReplicationSlots MaxReplicationSlots `json:"max_replication_slots"`
MaxSlotWALKeepSize MaxSlotWALKeepSize `json:"max_slot_wal_keep_size"`
MaxStackDepth MaxStackDepth `json:"max_stack_depth"`
Expand Down Expand Up @@ -217,15 +199,6 @@ type AutovacuumAnalyzeThreshold struct {
Type string `json:"type"`
}

type AutovacuumFreezeMaxAge struct {
Description string `json:"description"`
Example int `json:"example"`
Maximum int `json:"maximum"`
Minimum int `json:"minimum"`
RequiresRestart bool `json:"requires_restart"`
Type string `json:"type"`
}

type AutovacuumMaxWorkers struct {
Description string `json:"description"`
Maximum int `json:"maximum"`
Expand Down Expand Up @@ -342,44 +315,6 @@ type JIT struct {
Type string `json:"type"`
}

type LogAutovacuumMinDuration struct {
Description string `json:"description"`
Maximum int32 `json:"maximum"`
Minimum int32 `json:"minimum"`
RequiresRestart bool `json:"requires_restart"`
Type string `json:"type"`
}

type LogErrorVerbosity struct {
Description string `json:"description"`
Enum []string `json:"enum"`
RequiresRestart bool `json:"requires_restart"`
Type string `json:"type"`
}

type LogLinePrefix struct {
Description string `json:"description"`
Enum []string `json:"enum"`
RequiresRestart bool `json:"requires_restart"`
Type string `json:"type"`
}

type LogMinDurationStatement struct {
Description string `json:"description"`
Maximum int `json:"maximum"`
Minimum int `json:"minimum"`
RequiresRestart bool `json:"requires_restart"`
Type string `json:"type"`
}

type LogTempFiles struct {
Description string `json:"description"`
Maximum int32 `json:"maximum"`
Minimum int32 `json:"minimum"`
RequiresRestart bool `json:"requires_restart"`
Type string `json:"type"`
}

type MaxFilesPerProcess struct {
Description string `json:"description"`
Maximum int `json:"maximum"`
Expand Down Expand Up @@ -428,14 +363,6 @@ type MaxPredLocksPerTransaction struct {
Type string `json:"type"`
}

type MaxPreparedTransactions struct {
Description string `json:"description"`
Maximum int `json:"maximum"`
Minimum int `json:"minimum"`
RequiresRestart bool `json:"requires_restart"`
Type string `json:"type"`
}

type MaxReplicationSlots struct {
Description string `json:"description"`
Maximum int `json:"maximum"`
Expand Down Expand Up @@ -625,13 +552,6 @@ type PGLookoutMaxFailoverReplicationTimeLag struct {
Type string `json:"type"`
}

type PostgresDatabaseConfigInfoServiceLog struct {
Description string `json:"description"`
Example bool `json:"example"`
RequiresRestart bool `json:"requires_restart"`
Type []string `json:"type"`
}

type PostgresDatabaseConfigInfoSharedBuffersPercentage struct {
Description string `json:"description"`
Example float64 `json:"example"`
Expand All @@ -641,14 +561,6 @@ type PostgresDatabaseConfigInfoSharedBuffersPercentage struct {
Type string `json:"type"`
}

type PostgresDatabaseConfigInfoSynchronousReplication struct {
Description string `json:"description"`
Enum []string `json:"enum"`
Example string `json:"example"`
RequiresRestart bool `json:"requires_restart"`
Type string `json:"type"`
}

type PostgresDatabaseConfigInfoWorkMem struct {
Description string `json:"description"`
Example int `json:"example"`
Expand Down
41 changes: 0 additions & 41 deletions test/unit/fixtures/mysql_database_config_get.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@
"requires_restart": false,
"type": "integer"
},
"innodb_print_all_deadlocks": {
"description": "When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default.",
"example": true,
"requires_restart": false,
"type": "boolean"
},
"innodb_read_io_threads": {
"description": "The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service.",
"example": 10,
Expand Down Expand Up @@ -146,26 +140,6 @@
"requires_restart": false,
"type": "string"
},
"log_output": {
"description": "The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE.",
"enum": [
"INSIGHTS",
"NONE",
"TABLE",
"INSIGHTS,TABLE"
],
"example": "INSIGHTS",
"requires_restart": false,
"type": "string"
},
"long_query_time": {
"description": "The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute.",
"example": 10,
"maximum": 3600,
"minimum": 0.0,
"requires_restart": false,
"type": "number"
},
"max_allowed_packet": {
"description": "Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M)",
"example": 67108864,
Expand Down Expand Up @@ -206,12 +180,6 @@
"requires_restart": false,
"type": "integer"
},
"slow_query_log": {
"description": "Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table.",
"example": true,
"requires_restart": false,
"type": "boolean"
},
"sort_buffer_size": {
"description": "Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K)",
"example": 262144,
Expand Down Expand Up @@ -258,14 +226,5 @@
"minimum": 600,
"requires_restart": false,
"type": "integer"
},
"service_log": {
"description": "Store logs for the service so that they are available in the HTTP API and console.",
"example": true,
"requires_restart": false,
"type": [
"boolean",
"null"
]
}
}
Loading