File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,14 @@ public class CreateSchemaCommand implements CatalogCommand {
4949 private CreateSchemaCommand (String schemaName , boolean ifNotExists , boolean systemSchemaCommand ) {
5050 validateIdentifier (schemaName , "Name of the schema" );
5151
52- if (systemSchemaCommand && !CatalogUtils .isSystemSchema (schemaName )) {
53- throw new CatalogValidationException (format ("Not a system schema, schema: '{}'" , schemaName ));
52+ if (systemSchemaCommand ) {
53+ if (!CatalogUtils .isSystemSchema (schemaName )) {
54+ throw new CatalogValidationException (format ("Not a system schema, schema: '{}'" , schemaName ));
55+ }
56+ } else {
57+ if (CatalogUtils .isSystemSchema (schemaName )) {
58+ throw new CatalogValidationException ("Reserved system schema with name '{}' can't be created." , schemaName );
59+ }
5460 }
5561
5662 this .schemaName = schemaName ;
You can’t perform that action at this time.
0 commit comments