{"record":{"id":"f35ce8b359689b0c","repo":"OtterMind/Chat2DB","slug":"mysql-account-actionunsupported-f35ce8","errorCode":"mysql.account.actionUnsupported","errorMessage":"mysql.account.actionUnsupported","messagePattern":"mysql\\.account\\.actionUnsupported","errorType":"error_code","errorClass":"BusinessException","httpStatus":null,"severity":"error","filePath":"chat2db-community-server/chat2db-community-plugins/chat2db-community-mysql/src/main/java/ai/chat2db/plugin/mysql/account/MysqlAccountSqlBuilder.java","lineNumber":72,"sourceCode":"            }\n            case ALTER_PASSWORD -> {\n                requirePassword(command);\n                yield SQL_ALTER_USER + account(command) + SQL_IDENTIFIED_BY + passwordLiteral(command, maskSensitive);\n            }\n            case LOCK_ACCOUNT -> SQL_ALTER_USER + account(command) + SQL_ACCOUNT_LOCK;\n            case UNLOCK_ACCOUNT -> SQL_ALTER_USER + account(command) + SQL_ACCOUNT_UNLOCK;\n            case DROP_USER -> SQL_DROP_USER + account(command);\n            case GRANT_PRIVILEGE -> {\n                requirePrivileges(command);\n                yield SQL_GRANT + privilegeList(command.getPrivileges()) + SQLConstants.SQL_ON + scope(command) + SQLConstants.SQL_TO\n                        + account(command) + (Boolean.TRUE.equals(command.getGrantOption()) ? SQL_WITH_GRANT_OPTION : SQLConstants.EMPTY);\n            }\n            case REVOKE_PRIVILEGE -> {\n                requirePrivileges(command);\n                yield SQL_REVOKE + privilegeList(command.getPrivileges()) + SQLConstants.SQL_ON + scope(command) + SQL_FROM\n                        + account(command);\n            }\n            default -> throw new BusinessException(ERROR_KEY_ACCOUNT_ACTION_UNSUPPORTED);\n        };\n    }\n\n    private static String passwordLiteral(AccountOperationRequest command, boolean maskSensitive) {\n        return maskSensitive ? MASKED_PASSWORD_LITERAL : stringLiteral(command.getPassword());\n    }\n\n    static String previewToken(String sql) {\n        try {\n            MessageDigest digest = MessageDigest.getInstance(SHA_256_ALGORITHM);\n            byte[] hash = digest.digest(sql.getBytes(StandardCharsets.UTF_8));\n            StringBuilder builder = new StringBuilder();\n            for (byte b : hash) {\n                builder.append(String.format(HEX_BYTE_FORMAT, b));\n            }\n            return builder.toString();\n        } catch (NoSuchAlgorithmException e) {\n            throw new IllegalStateException(e);","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/OtterMind/Chat2DB/blob/5ee1e990e73fbcae1969dc554be254fedb3ab888/chat2db-community-server/chat2db-community-plugins/chat2db-community-mysql/src/main/java/ai/chat2db/plugin/mysql/account/MysqlAccountSqlBuilder.java#L54-L90","documentation":"Error \"mysql.account.actionUnsupported\" thrown in OtterMind/Chat2DB.","triggerScenarios":"MysqlAccountSqlBuilder received an action it cannot render into SQL.","commonSituations":"See trigger scenarios.","solutions":["Use a supported account action (create, alter, drop, grant, revoke) when building account SQL."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ee1e990e73fbcae1969dc554be254fedb3ab888","analyzedAt":"2026-08-14T07:05:03.077Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}