MySQL options of the owner kept across starts (#103)

Settings, Service edits Settings/mysql-custom.ini. Every start adds its name = value lines
(outside a section or in [mysqld]) to the rendered my.ini, after the defaults so they
win; the port, addresses, data and log paths, sockets and !include stay managed. Nothing
changes for a server without the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ДмитрийandClaude Opus 5.5 committed 2026-11-15 20:21:24 +05:00
1 parent f08ae1c76b
commit 20657df203
13 files changed
+211 -2

No files matched your search

+23
View File
@@ -1238,6 +1238,27 @@ async fn realm_select(
result
}
#[tauri::command]
async fn mysql_custom(
state: State<'_, AppState>,
id: String,
) -> std::result::Result<coa_core::launcher::render::CustomMysql, UiError> {
let root = path_of(&state, &id)?;
blocking(move || Ok(coa_core::launcher::render::read_custom_mysql(&root))).await
}
/// The owner's own MySQL options (Settings/mysql-custom.ini); they apply at the next start of the database.
#[tauri::command]
async fn mysql_custom_save(
state: State<'_, AppState>,
id: String,
text: String,
) -> std::result::Result<coa_core::launcher::render::CustomMysql, UiError> {
let root = path_of(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?;
blocking(move || coa_core::launcher::render::write_custom_mysql(&root, &text)).await
}
#[tauri::command]
async fn realm_names(
state: State<'_, AppState>,
@@ -3011,6 +3032,8 @@ pub fn run() {
realm_with_reborn,
realm_names,
realm_rename,
mysql_custom,
mysql_custom_save,
check_database,
repair_server,
module_set_enabled,