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

Creating multiple indexes impossible

    XMLWordPrintable

    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

            People

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

              Dates

              Created:
              Updated:
              Resolved: