| Bug #105004 | mysql 8.0 parser consuming more memory than 5.7 for similar query | ||
|---|---|---|---|
| Submitted: | 22 Sep 2021 10:20 | Modified: | 23 Apr 8:39 |
| Reporter: | Chelluru Vidyadhar | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Parser | Severity: | S2 (Serious) |
| Version: | 8.0.26 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | regression | ||
[22 Sep 2021 10:20]
Chelluru Vidyadhar
[22 Sep 2021 10:27]
Chelluru Vidyadhar
This file contains compressed queries files and schema file
Attachment: data.tar.gz (application/x-gzip, text), 2.72 MiB.
[23 Sep 2021 8:33]
MySQL Verification Team
Hello Chelluru, Thank you for the report and feedback. Verified as described. regards, Umesh
[23 Sep 2021 8:34]
MySQL Verification Team
- Didn't observe any OOM(was on bigger box) - 5.7.35 mysql> select * from sys.memory_by_user_by_current_bytes; +------------+--------------------+-------------------+-------------------+-------------------+-----------------+ | user | current_count_used | current_allocated | current_avg_alloc | current_max_alloc | total_allocated | +------------+--------------------+-------------------+-------------------+-------------------+-----------------+ | root | 3448 | 7.71 GiB | 2.29 MiB | 7.23 GiB | 11.86 GiB | | background | 0 | 0 bytes | 0 bytes | 0 bytes | 3.36 KiB | +------------+--------------------+-------------------+-------------------+-------------------+-----------------+ 2 rows in set (0.01 sec) - 8.0.26 mysql> select * from sys.memory_by_user_by_current_bytes; +-----------------+--------------------+-------------------+-------------------+-------------------+-----------------+ | user | current_count_used | current_allocated | current_avg_alloc | current_max_alloc | total_allocated | +-----------------+--------------------+-------------------+-------------------+-------------------+-----------------+ | root | 422 | 75.94 GiB | 184.27 MiB | 75.62 GiB | 275.42 GiB | | background | 11236 | 1.44 MiB | 134 bytes | 413.56 KiB | 198.80 MiB | | event_scheduler | 3 | 16.18 KiB | 5.39 KiB | 16.01 KiB | 16.18 KiB | +-----------------+--------------------+-------------------+-------------------+-------------------+-----------------+ 3 rows in set (0.00 sec)
[9 Dec 2023 15:17]
Matt T
Is there any progress on getting this resolved? This is a major blocker for our upgrade from 5.7, and it looks like it recently affected GitHub too: https://github.blog/2023-12-07-upgrading-github-com-to-mysql-8-0/#queries-would-pass-ci-bu....
[22 Feb 2024 19:27]
Melissa Arcand
This is a MAJOR issue for us and is resulting in frequent RDS server crashing and complete outages. AWS has confirmed that this is a known issue affecting multiple customers running MYSQL (not just us). Refactoring all IN statements to avoid this is not a feasible workaround.
[23 Apr 8:39]
Edward Gilmore
Posted by developer: Added the following note to the MySQL Server 8.0.46, 8.4.9, and 9.7.0 release notes: The SQL parser consumed a large amount of memory when parsing very large queries with many large IN clauses. As of this release, the SQL parser's memory management has been improved.
