Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4270

DROP COLUMN IF EXISTS fails if the column is already present

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Icebox
    • None
    • Server version: 10.5.6
      MCS version: 1.5.4-1

    Description

      DROP COLUMN IF EXISTS fails if the column is already present.

      MariaDB> CREATE TABLE t1 (c1 INT, c2 CHAR(1)) ENGINE=Columnstore;
      Query OK, 0 rows affected (0.181 sec)

      MariaDB> INSERT INTO t1 VALUES (1, 'a');
      Query OK, 1 row affected (0.293 sec)

      MariaDB> SHOW CREATE TABLE t1;
      -------------------------------------------------------------------------------------------------------------------------------+

      Table Create Table

      -------------------------------------------------------------------------------------------------------------------------------+

      t1 CREATE TABLE `t1` (
      `c1` int(11) DEFAULT NULL,
      `c2` char(1) DEFAULT NULL
      ) ENGINE=Columnstore DEFAULT CHARSET=latin1

      -------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.000 sec)

      MariaDB> ALTER TABLE t1 DROP COLUMN IF EXISTS c1;
      ERROR 1178 (42000): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.
      MariaDB> ALTER TABLE t1 DROP COLUMN c1;
      Query OK, 0 rows affected (0.264 sec)
      Records: 0 Duplicates: 0 Warnings: 0

      MariaDB> ALTER TABLE t1 DROP COLUMN IF EXISTS c1;
      Query OK, 0 rows affected, 1 warning (0.000 sec)
      Records: 0 Duplicates: 0 Warnings: 1

      MariaDB> SHOW WARNINGS;
      -------------------------------------------------------

      Level Code Message

      -------------------------------------------------------

      Note 1091 Can't DROP COLUMN `c1`; check that it exists

      -------------------------------------------------------
      1 row in set (0.000 sec)

      MariaDB>

      Attachments

        Issue Links

          Activity

            Polaris Polaris added a comment -

            Hello, I’m interested in working on this task.
            Could you please assign it to me? I’d also appreciate any additional guidance before I start.

            Polaris Polaris added a comment - Hello, I’m interested in working on this task. Could you please assign it to me? I’d also appreciate any additional guidance before I start.
            drrtuy Roman added a comment -

            Hi Polaris.
            We can't assign to you at this point.
            I suggest you to contact us via MariaDB Foundation Zulip, so we can discuss the issue.

            drrtuy Roman added a comment - Hi Polaris . We can't assign to you at this point. I suggest you to contact us via MariaDB Foundation Zulip , so we can discuss the issue.

            People

              Unassigned Unassigned
              susil.behera Susil Behera
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.