[MDEV-13851] Always check table options in ALTER TABLE…ALGORITHM=INPLACE Created: 2017-09-20 Updated: 2017-09-20 Resolved: 2017-09-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.0 |
| Fix Version/s: | 10.2.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | encryption | ||
| Issue Links: |
|
||||||||||||
| Description |
|
The test encryption.innodb-spatial-index creates a table with ENCRYPTED=YES, and then expects an ADD SPATIAL INDEX, ALGORITHM=COPY operation to fail. However, an operation with FORCE, ALGORITHM=COPY is just fine (in both 10.1 and 10.2):
In my opinion, ALTER TABLE...ALGORITHM=COPY must always succeed, and it must always preserve those table attributes that were not specified in the ALTER. |
| Comments |
| Comment by Marko Mäkelä [ 2017-09-20 ] | ||||||||||||||||
|
So, the bug is not that ADD SPATIAL INDEX, ALGORITHM=COPY is refused, but it is that ADD SPATIAL INDEX, ALGORITHM=INPLACE is not refused when the table is encrypted. | ||||||||||||||||
| Comment by Marko Mäkelä [ 2017-09-20 ] | ||||||||||||||||
|
This (so far untested) fix should take care of it:
| ||||||||||||||||
| Comment by Marko Mäkelä [ 2017-09-20 ] | ||||||||||||||||
|
With the above patch, we do get one test failure:
I think that this is the proper thing to do. The context:
This would even force a table rebuild, creating a new .ibd file. |