[MDEV-25078] ALTER INDEX is inconsistent with ADD/DROP/RENAME index Created: 2021-03-07 Updated: 2021-05-25 Resolved: 2021-05-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table |
| Affects Version/s: | 10.6 |
| Fix Version/s: | 10.6.2 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Description |
|
The new sub-command ALTER TABLE .. ALTER INDEX, added within the scope of ALTER doesn't accept KEY as a synonym for INDEX, while ADD/DROP/RENAME do :
ALTER doesn't accept IF EXISTS clause, while DROP/RENAME do, and ADD accepts IF NOT EXISTS:
|
| Comments |
| Comment by Sergei Petrunia [ 2021-03-17 ] |
|
Pushed d9c5eb2f33afd5764519330b909d59e1215b3d19, Varun's patch adding ALTER TABLE ALTER KEY [NOT] IGNORED. |
| Comment by Sergei Petrunia [ 2021-03-17 ] |
|
Supporting if exists seems like a lower priority for me. |
| Comment by Elena Stepanova [ 2021-03-17 ] |
|
psergey: |
| Comment by Sergei Petrunia [ 2021-05-14 ] |
|
Ok adding IF EXISTS turned out to be easy: http://lists.askmonty.org/pipermail/commits/2021-May/014603.html , bb-10.6-mdev25078. Need a review for this. |
| Comment by Sergei Petrunia [ 2021-05-18 ] |
|
holyfoot , please review the above IF EXISTS patch |
| Comment by Alexey Botchkov [ 2021-05-24 ] |
|
fix for the IF EXISTS clause looks fine. |