{"record":{"id":"f507cf9a0f718de1","repo":"OtterMind/Chat2DB","slug":"mysql-account-literalrequired","errorCode":"mysql.account.literalRequired","errorMessage":"mysql.account.literalRequired","messagePattern":"mysql\\.account\\.literalRequired","errorType":"validation","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":117,"sourceCode":"        validateAccountPart(user, ERROR_KEY_ACCOUNT_USER_REQUIRED);\n        validateAccountPart(host, ERROR_KEY_ACCOUNT_HOST_REQUIRED);\n        return stringLiteral(user) + SQLConstants.AT + stringLiteral(host);\n    }\n\n    static String showGrantsSql(String user, String host) {\n        return SQL_SHOW_GRANTS_FOR + account(user, host);\n    }\n\n    static String identifier(String name) {\n        if (StringUtils.isBlank(name)) {\n            throw new BusinessException(ERROR_KEY_ACCOUNT_IDENTIFIER_REQUIRED);\n        }\n        return SQLConstants.BACK_QUOTE + name.replace(SQLConstants.BACK_QUOTE, ESCAPED_BACK_QUOTE) + SQLConstants.BACK_QUOTE;\n    }\n\n    static String stringLiteral(String value) {\n        if (value == null) {\n            throw new BusinessException(ERROR_KEY_ACCOUNT_LITERAL_REQUIRED);\n        }\n        return SQLConstants.SINGLE_QUOTE + value.replace(SQLConstants.BACKSLASH, ESCAPED_BACKSLASH).replace(SQLConstants.SINGLE_QUOTE, ESCAPED_SINGLE_QUOTE) + SQLConstants.SINGLE_QUOTE;\n    }\n\n    static String scopeSql(AccountOperationRequest command) {\n        switch (PrivilegeScopeEnum.from(command.getScope())) {\n            case GLOBAL:\n                return ALL_DATABASE_ALL_TABLE_SCOPE;\n            case DATABASE:\n                if (StringUtils.isBlank(command.getDatabaseName())) {\n                    throw new BusinessException(ERROR_KEY_ACCOUNT_DATABASE_REQUIRED);\n                }\n                return identifier(command.getDatabaseName()) + ALL_TABLE_SCOPE_SUFFIX;\n            case TABLE:\n                if (StringUtils.isBlank(command.getDatabaseName())) {\n                    throw new BusinessException(ERROR_KEY_ACCOUNT_DATABASE_REQUIRED);\n                }\n                if (StringUtils.isBlank(command.getTableName())) {","sourceCodeStart":99,"sourceCodeEnd":135,"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#L99-L135","documentation":"Error \"mysql.account.literalRequired\" thrown in OtterMind/Chat2DB.","triggerScenarios":"The account SQL builder needed a literal value that was missing.","commonSituations":"See trigger scenarios.","solutions":["Supply the required string literal, such as a password or option value, for the account statement."],"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"}