Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
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
- relates to
-
MCOL-5890 DROP TABLE IF EXISTS should not generate errors for non existing tables
-
- In Progress
-
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.