server: determine sql server variant, fix lock-user,unlock-user
All checks were successful
Build and test / check (push) Successful in 1m54s
Build and test / build (push) Successful in 3m10s
Build and test / test (push) Successful in 3m30s
Build and test / check-license (push) Successful in 7m25s
Build and test / docs (push) Successful in 5m26s

This commit is contained in:
2025-12-14 03:30:40 +09:00
parent dc7b72efe5
commit 4c82da390f
7 changed files with 194 additions and 55 deletions

View File

@@ -140,6 +140,7 @@ pub async fn get_databases_privilege_data(
database_names: Vec<MySQLDatabase>,
unix_user: &UnixUser,
connection: &mut MySqlConnection,
_db_is_mariadb: bool,
) -> ListPrivilegesResponse {
let mut results = BTreeMap::new();
@@ -187,6 +188,7 @@ pub async fn get_databases_privilege_data(
pub async fn get_all_database_privileges(
unix_user: &UnixUser,
connection: &mut MySqlConnection,
_db_is_mariadb: bool,
) -> ListAllPrivilegesResponse {
let result = sqlx::query_as::<_, DatabasePrivilegeRow>(&format!(
indoc! {r#"
@@ -394,6 +396,7 @@ pub async fn apply_privilege_diffs(
database_privilege_diffs: BTreeSet<DatabasePrivilegesDiff>,
unix_user: &UnixUser,
connection: &mut MySqlConnection,
_db_is_mariadb: bool,
) -> ModifyPrivilegesResponse {
let mut results: BTreeMap<(MySQLDatabase, MySQLUser), _> = BTreeMap::new();
@@ -451,10 +454,7 @@ pub async fn apply_privilege_diffs(
.await
.unwrap()
{
results.insert(
key,
Err(ModifyDatabasePrivilegesError::UserDoesNotExist),
);
results.insert(key, Err(ModifyDatabasePrivilegesError::UserDoesNotExist));
continue;
}