Skip to content

dialect(oracle, clickhouse): createSchema and dropSchema, tested in Docker - #104

Merged
stbischof merged 1 commit into
eclipse-daanse:mainfrom
dbulahov:main261126
Nov 26, 2026
Merged

stbischof merged 1 commit into
eclipse-daanse:mainfrom
dbulahov:main261126

Conversation

@dbulahov

Copy link
Copy Markdown
Contributor

What does this PR do?

Both wrote CREATE SCHEMA and DROP SCHEMA, which neither server runs in
any version checked.

OracleDialect (XE 18, 21, Free 23.9, 23.26.4):

  • a schema is a user: CREATE SCHEMA is Oracle's CREATE SCHEMA AUTHORIZATION, objects for a user there already (ORA-02420), and DROP SCHEMA no statement (ORA-00950)
  • createSchema: CREATE USER [IF NOT EXISTS] "s" NO AUTHENTICATION QUOTA UNLIMITED ON USERS; without the quota a table of the schema takes no row (ORA-01950); USERS must be there, as in XE and Free
  • dropSchema: DROP USER [IF EXISTS] "s" CASCADE, always CASCADE, for Oracle drops no user of objects without it (ORA-01922)
  • IF [NOT] EXISTS from 23, left out before and for no version, as for users; supportsDropSchemaIfExists from 23
  • supportsSchemas as supportsUsers, from 18: 11 has no NO AUTHENTICATION, createSchema and dropSchema give null there

ClickHouseDialect (21.3 to 26.6):

  • a schema is a database: CREATE SCHEMA and DROP SCHEMA are syntax errors (Code 62) in every version
  • createSchema: CREATE DATABASE [IF NOT EXISTS] "s"
  • dropSchema: DROP DATABASE [IF EXISTS] "s", which drops its tables; no CASCADE, which ClickHouse has not

Container tests, the dialect built from a live connection:

  • OracleSchemaTest: the schema a user authenticated by nothing, a table of it takes rows, a second create fails with ORA-01920, the drop takes the table along; IF [NOT] EXISTS from 23, ORA-01918 for a missing one before
  • ClickHouseSchemaTest: the schema a database, a table of it takes rows, IF NOT EXISTS twice, the drop takes the table along, without IF [NOT] EXISTS a second create and a second drop fail

…ocker

  Both wrote CREATE SCHEMA and DROP SCHEMA, which neither server runs in
  any version checked.

  OracleDialect (XE 18, 21, Free 23.9, 23.26.4):
  - a schema is a user: CREATE SCHEMA is Oracle's CREATE SCHEMA
    AUTHORIZATION, objects for a user there already (ORA-02420), and
    DROP SCHEMA no statement (ORA-00950)
  - createSchema: CREATE USER [IF NOT EXISTS] "s" NO AUTHENTICATION
    QUOTA UNLIMITED ON USERS; without the quota a table of the schema
    takes no row (ORA-01950); USERS must be there, as in XE and Free
  - dropSchema: DROP USER [IF EXISTS] "s" CASCADE, always CASCADE, for
    Oracle drops no user of objects without it (ORA-01922)
  - IF [NOT] EXISTS from 23, left out before and for no version, as for
    users; supportsDropSchemaIfExists from 23
  - supportsSchemas as supportsUsers, from 18: 11 has no NO
    AUTHENTICATION, createSchema and dropSchema give null there

  ClickHouseDialect (21.3 to 26.6):
  - a schema is a database: CREATE SCHEMA and DROP SCHEMA are syntax
    errors (Code 62) in every version
  - createSchema: CREATE DATABASE [IF NOT EXISTS] "s"
  - dropSchema: DROP DATABASE [IF EXISTS] "s", which drops its tables;
    no CASCADE, which ClickHouse has not

  Container tests, the dialect built from a live connection:
  - OracleSchemaTest: the schema a user authenticated by nothing, a
    table of it takes rows, a second create fails with ORA-01920, the
    drop takes the table along; IF [NOT] EXISTS from 23, ORA-01918 for
    a missing one before
  - ClickHouseSchemaTest: the schema a database, a table of it takes
    rows, IF NOT EXISTS twice, the drop takes the table along, without
    IF [NOT] EXISTS a second create and a second drop fail

  Signed-off-by: <bulahovdenis@gmail.com>
@stbischof
stbischof merged commit 0606ee4 into eclipse-daanse:main Nov 26, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants