[MDEV-28240] InnoDB Temporary Tablespace (ibtmp1) is continuously growing Created: 2022-04-04 Updated: 2022-12-14 Resolved: 2022-09-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.6.2, 10.7, 10.8 |
| Fix Version/s: | 10.6.10, 10.7.6, 10.8.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Oli Sennhauser | Assignee: | Thirunarayanan Balathandayuthapani |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | create, innodb, table, temporary | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Description |
|
If we have an Event Scheduler calling a Stored Procedure (once a second) creating an explicit temporary table (with engine InnoDB) the InnoDB temporary tablespace (ibtmp1) is continuously growing until the disk is full. This does NOT happen with 10.5 (10.5.8 and 10.5.12 no problem) and started with 10.6 (10.6.5 it happens, 10.7.1 it happens) until 10.8. It happens on Windows and Linux (Ubuntu 18.04) The growth rate is about 22.5 Mibyte per minute. And the temporary tablespace is growing in chuncks of 64 Mibyte.
A reproducible test case is attached. Do not forget to enable Event scheduler! The test case seems to be reproducible at will in about 1 minute... Low hanging fruit! SET GLOBAL event_scheduler = ON; Possible related: https://jira.mariadb.org/browse/MDEV-26782 Workaround: CREATE TEMPORARY TABLE ... ENGINE = Aria (SELECT * FROM ...) |
| Comments |
| Comment by Thirunarayanan Balathandayuthapani [ 2022-09-02 ] | |||||
|
Problem in 10.6 happens due to the following commit:
Problem should happen from 10.6.2. Temporary tables doesn't free any segment related to indexes. | |||||
| Comment by Thirunarayanan Balathandayuthapani [ 2022-09-02 ] | |||||
|
Patch is in bb-10.6- | |||||
| Comment by Marko Mäkelä [ 2022-09-05 ] | |||||
|
Thank you for locating and fixing the problem. The fix looks OK to me. | |||||
| Comment by Alex [ 2022-10-28 ] | |||||
|
I can confirm that ibtmp1 is no longer permanently growing after updating to 10.6.10 over a month ago. Just wondering why my initial bug-reports of this issue over a year ago ( | |||||
| Comment by Sergei Golubchik [ 2022-10-28 ] | |||||
|
It wasn't ignored as such, it was in the bugfixing queue. This | |||||
| Comment by Alex [ 2022-11-02 ] | |||||
|
Actually this issue is a duplicate of |