Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
-
10.1.31
Description
In the scope of MDEV-318, ALTER TABLE was extended to allow IF [NOT] EXISTS clauses, including those for MODIFY COLUMN and CHANGE COLUMN. However, ALTER COLUMN does not accept it:
MariaDB [test]> create table t1 (i int); |
Query OK, 0 rows affected (0.26 sec) |
|
MariaDB [test]> alter table t1 change column if exists a b int; |
Query OK, 0 rows affected, 1 warning (0.00 sec) |
Records: 0 Duplicates: 0 Warnings: 1
|
|
MariaDB [test]> alter table t1 alter column if exists a set default 1; |
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 'if exists a set default 1' at line 1 |
MariaDB [test]> select @@version; |
+-----------------------+ |
| @@version |
|
+-----------------------+ |
| 10.0.34-MariaDB-debug |
|
+-----------------------+ |
1 row in set (0.00 sec) |
The task doesn't say anything about it being left out intentionally, so I suppose it's an omission.