Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-34953

tablename of CONSTRAINT FOREIGN KEY REFERENCES case error

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.4.3
    • 11.4
    • None
    • Windows 11 Professionnel, Version 23H2
      - Mariadb filesystem folders case sensitivity enabled
      - Mariadb lower_case_table_names=0

    Description

      after table creation with foreign key constraint, the reference table name is defined in lowercase, even it was provided in upper case.

      CREATE TABLE `FAMILY_PARENT` (
        `PARENT_ID` char(36) NOT NULL,
        `PARENT_NAME` varchar(200) NOT NULL,
        PRIMARY KEY (`PARENT_ID`)
      ) ENGINE=InnoDB  ;
       
      CREATE TABLE `FAMILY_CHILD` (
        `PARENT_ID` char(36) NOT NULL,
        `CHILD_NAME` varchar(200) NOT NULL,
        PRIMARY KEY (`PARENT_ID`,`CHILD_NAME`),
        CONSTRAINT `CHILD_FK` FOREIGN KEY (`PARENT_ID`) REFERENCES `FAMILY_PARENT` (`PARENT_ID`) ON DELETE CASCADE
      ) ENGINE=InnoDB  ;
       
      SHOW CREATE TABLE `FAMILY_CHILD`;
       
      CREATE TABLE `FAMILY_CHILD` (
         `PARENT_ID` char(36) NOT NULL,
         `CHILD_NAME` varchar(200) NOT NULL,
         PRIMARY KEY (`PARENT_ID`,`CHILD_NAME`),
         CONSTRAINT `CHILD_FK` FOREIGN KEY (`PARENT_ID`) REFERENCES `family_parent` (`PARENT_ID`) ON DELETE CASCADE
       ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
      

      Attachments

        Activity

          People

            wlad Vladislav Vaintroub
            mbanaouas mohamed banaouas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.