Skip to content

Migrating MariaDB's existing database with a case insensitive environment and getting the error: Can't create database 'dbname'; database exists. #215

@najeraz

Description

@najeraz

Describe the bug
When migrating an existing database using a name with a different case, grate tries to re-create it when the MariaDB instance and the environment have enabled the case insensitive.

To Reproduce

  • Run a MariaDB instance with the environment variable lower_case_table_names as 1 with:
    docker run --name GrateTestCaseInsensitive -p 49185:3306 -e MYSQL_ROOT_PASSWORD=mypass mariadb:10.5.9 mysqld --lower_case_table_names=1
  • Create a database manually with a name using uppercase letters.
  • Migrate it with the same name using a camel case.

Expected behavior
If the case name is insensitive, it should not try to create the existing database.

Desktop

  • OS: Windows 11 Enterprise
  • Version 21H2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions