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

Creating multiple indexes impossible

Details

    Description

      In MySQL Workbench, I created a data model. That model has a table where I set two columns to take unique values. The script part is the following:

      bq. CREATE TABLE IF NOT EXISTS `tennisMath`.`Court` (
      bq.   `idCourt` INT NOT NULL AUTO_INCREMENT,
      bq.   `letterNumber` CHAR(2) NOT NULL,
      bq.   `surface` ENUM('grass', 'clay') NOT NULL,
      bq.   PRIMARY KEY (`idCourt`),
      bq.   UNIQUE INDEX `idCourt_UNIQUE` (`idCourt` ASC) VISIBLE,
      bq.   UNIQUE INDEX `letterNumber_UNIQUE` (`letterNumber` ASC) VISIBLE)
      bq. ENGINE = InnoDB;
      

      Once I forward-engineer the script, I get the following error message:

      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '

      UNIQUE INDEX `letterNumber_UNIQUE` (`letterNumber` ASC) VISIBLE)

      Attachments

        Activity

          greenman Ian Gilfillan added a comment -

          This is not a bug. The VISIBLE attribute does not exist in MariaDB 10.3. You can either use MariaDB 10.5, or, in MySQL Workbench, go to "Preferences" and change the "Target MySQL version" to 5.7.

          greenman Ian Gilfillan added a comment - This is not a bug. The VISIBLE attribute does not exist in MariaDB 10.3. You can either use MariaDB 10.5, or, in MySQL Workbench, go to "Preferences" and change the "Target MySQL version" to 5.7.

          People

            Unassigned Unassigned
            peacecop kalmer: peacecop kalmer:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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