[MDEV-4440] IF NOT EXISTS in multi-action ALTER does not work when the problem is created by a previous part of the ALTER Created: 2013-04-25 Updated: 2014-06-10 Resolved: 2014-06-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.2 |
| Fix Version/s: | 10.0.12 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Alexey Botchkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
If ALTER TABLE contains multiple parts, and one of them creates a problem for a next one, IF NOT EXISTS or IF EXISTS clause in the following one does not work, the statement still produces an error, and does not add the column at all:
Same for DROP COLUMN. Test case:
|
| Comments |
| Comment by Sergei Golubchik [ 2014-01-14 ] |
|
let's just document that. ALTER isn't executing its clauses sequentially, it's doing everything at once. So all IF [NOT] EXISTS clauses apply to the table structure before ALTER, there's no intermediate state. |
| Comment by Alexey Botchkov [ 2014-06-10 ] |
|
Fixing patch: |