[MDEV-8751] Result of DISCARD TABLESPACE depends on innodb_stats_persistent Created: 2015-09-04 Updated: 2015-09-07 Resolved: 2015-09-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB, Storage Engine - XtraDB |
| Affects Version/s: | N/A |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Note: Observed on bb-10.1-jan-encryption. The test case below is pretty much the same as in
The problem is that the result of DISCARD TABLESPACE is different if the server was started with innodb_stats_persistent enabled (default) or disabled. If it's disnabled, the ALTER succeeds with warnings. If it's enabled, ALTER fails. Dependency on a seemingly unrelated option is disturbing, so at least it's worth checking whether it's intentional.
|
| Comments |
| Comment by Jan Lindström (Inactive) [ 2015-09-07 ] |
|
Option is not unrelated. To gather persistent statistics from a table, you need to read at least few pages from that table to get e.g. size. If table is encrypted, you can't read pages and estimate the size. After you have read pages from the table, table is not anymore usable (because we mark it encrypted). If you do not read any pages, you should still be able to discard tablespace to get rid of table (drop might actually also work on some cases). |
| Comment by Elena Stepanova [ 2015-09-07 ] |
|
Fair enough. It would be nice to document subtleties like this (not urgently, but some time), it's really not obvious and can cause confusion. Of course, users won't read this documentation until they encounter the oddity, but at least it will be easier to find explanation. |