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

incorrect behavior of ALTER ... COLUMN IF [NOT] EXISTS

    XMLWordPrintable

Details

    Description

      create table t (c date);
      alter table t change column if exists n c int unique;
      

      this should fail, because the column n does not exist. But it partially succeeds, the result is c date unique.

      Another example, for ADD IF NOT EXISTS:

      create table t (c date);
      alter table t add column if not exists c int unique;
      

      Same effect.

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            serg Sergei Golubchik
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.