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

duplicate CHECK constraint name

    XMLWordPrintable

    Details

      Description

      CREATE TABLE t (
      path VARCHAR(100) NOT NULL COLLATE 'utf8_general_ci',
      json_c1 JSON NOT NULL DEFAULT '' COLLATE 'utf8mb4_bin',
      json_c2 JSON NOT NULL DEFAULT '' COLLATE 'utf8mb4_bin',
      comment VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
      UNIQUE INDEX path (path),
      CONSTRAINT json_c1 CHECK (path > 0)
      )
      ;
      select * from information_schema.check_constraints where table_name='t';
      

      another example

      create table t (a int check (a>2), constraint a check (a < 5));
      select * from information_schema.check_constraints where table_name='t';
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              anel Anel Husakovic
              Reporter:
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration