[MDEV-17066] Bytes lost or Assertion `status_var.local_memory_used == 0 after DELETE with subquery with ROLLUP Created: 2018-08-24 Updated: 2020-10-06 Resolved: 2020-08-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server, Storage Engine - InnoDB |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.2.35, 10.3.26, 10.4.16, 10.5.7 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Varun Gupta (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The effect seems to be sporadic, sometimes the failure doesn't happen. Run several times if it doesn't fail right away. |
| Comments |
| Comment by Marko Mäkelä [ 2019-03-26 ] | |||||||||||||||||||||
|
The bug ought to be outside InnoDB. InnoDB should not be allocating any memory via that interface. | |||||||||||||||||||||
| Comment by Alexander Barkov [ 2019-08-30 ] | |||||||||||||||||||||
|
Also repeatable with MyISAM if I put this code into a new *.test file (not repeatable from command line):
gdb shows this amount of memory used at the end:
| |||||||||||||||||||||
| Comment by Varun Gupta (Inactive) [ 2020-07-21 ] | |||||||||||||||||||||
|
Test case with SELECT fails without ROLLUP | |||||||||||||||||||||
| Comment by Varun Gupta (Inactive) [ 2020-07-22 ] | |||||||||||||||||||||
|
The test case with innodb is not deterministic because the stats.records is used while deciding if we want to use a cache to read the records from the temp table. So the test case above with MYISAM fails reliably. Also the problem here was that the cache used to read the records from the temp table (rr_from_cache) was allocated at each execution of the subquery but was only deallocated after the last execution of the subquery. | |||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2020-07-27 ] | |||||||||||||||||||||
|
https://github.com/MariaDB/server/commit/65cd129f1f7bf4a14ebe5c22a89646e986af99d9 OK to push. Thank you! |