{"record":{"id":"459976b6e2824baf","repo":"OtterMind/Chat2DB","slug":"mysql-account-tablerequired","errorCode":"mysql.account.tableRequired","errorMessage":"mysql.account.tableRequired","messagePattern":"mysql\\.account\\.tableRequired","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":136,"sourceCode":"        }\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())) {\n                    throw new BusinessException(ERROR_KEY_ACCOUNT_TABLE_REQUIRED);\n                }\n                return identifier(command.getDatabaseName()) + SQLConstants.DOT + identifier(command.getTableName());\n            default:\n                throw new BusinessException(ERROR_KEY_ACCOUNT_SCOPE_UNSUPPORTED);\n        }\n    }\n\n    private static String scope(AccountOperationRequest command) {\n        return scopeSql(command);\n    }\n\n    private static String privilegeList(List<String> privileges) {\n        String sqlPrivileges = privileges.stream()\n                .filter(Objects::nonNull)\n                .distinct()\n                .map(MysqlPrivilege::sqlName)\n                .collect(Collectors.joining(SQLConstants.COMMA_SPACE));\n        if (StringUtils.isBlank(sqlPrivileges)) {","sourceCodeStart":118,"sourceCodeEnd":154,"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#L118-L154","documentation":"Error \"mysql.account.tableRequired\" thrown in OtterMind/Chat2DB.","triggerScenarios":"A table-scoped privilege operation was requested without a table name.","commonSituations":"See trigger scenarios.","solutions":["Set the table name for table-scoped grant/revoke operations."],"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"}