[MDEV-17885] TRUNCATE on temporary table causes ER_GET_ERRNO and "Could not remove temporary table" in the log Created: 2018-12-01 Updated: 2018-12-12 Resolved: 2018-12-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Temporary, Storage Engine - InnoDB |
| Affects Version/s: | 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.4.1, 10.2.20, 10.3.12 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | regression | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
It appears that innodb_safe_truncate makes TRUNCATE unsafe:
There is no warning/error with innodb_safe_truncate=OFF |
| Comments |
| Comment by Marko Mäkelä [ 2018-12-12 ] | |||||||||||||||||||||||||||||
|
I think that TRUNCATE is correctly refusing and rolling back the operation, now that The actual error is that ALTER TABLE is lacking validation that is being done by CREATE TABLE. This is similar to | |||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2018-12-12 ] | |||||||||||||||||||||||||||||
|
Actually, CREATE appears to accept the table options, but TRUNCATE will complain:
| |||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2018-12-12 ] | |||||||||||||||||||||||||||||
|
With the following fix, CREATE TEMPORARY TABLE would reject those table options that are only valid for .ibd files:
However, this would introduce a regression for CREATE TEMPORARY TABLE behaviour in the generally available 10.2 and 10.3 series. The following would allow the TRUNCATE TABLE to succeed:
| |||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2018-12-12 ] | |||||||||||||||||||||||||||||
|
I filed MDEV-17983 for making CREATE TEMPORARY TABLE stricter. |