Bug #99382 | Complex nested views take up a lot of memory | ||
---|---|---|---|
Submitted: | 28 Apr 2020 7:34 | Modified: | 29 Apr 2020 7:55 |
Reporter: | Fengchun Hua | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Parser | Severity: | S1 (Critical) |
Version: | 5.7, 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | out of memory |
[28 Apr 2020 7:34]
Fengchun Hua
[28 Apr 2020 7:34]
Fengchun Hua
sql file
Attachment: sql.txt (text/plain), 43.85 KiB.
[28 Apr 2020 7:34]
Fengchun Hua
sql file
Attachment: sql.txt (text/plain), 43.85 KiB.
[29 Apr 2020 7:55]
MySQL Verification Team
Thanks for the report. Verified on 5.7 and 8.0.20. mysqld memory grew to 12GB which was unexpected.
[29 Apr 2020 8:06]
MySQL Verification Team
8.0.20 heap profile picture
Attachment: mybin.hprof.0383.heap.pdf (application/pdf, text), 18.47 KiB.
[29 Apr 2020 8:13]
MySQL Verification Team
Workaround is to avoid such complex queries that consume parser memory. See: https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_parser_max_mem... After that, memory is stable and you get errors instead: ERROR 3170 (HY000): Memory capacity of 10000000 bytes for 'parser_max_mem_size' exceeded. Parser bailed out for this query. ERROR 3170 (HY000): Memory capacity of 10000000 bytes for 'parser_max_mem_size' exceeded. Parser bailed out for this query. ERROR 3170 (HY000): Memory capacity of 10000000 bytes for 'parser_max_mem_size' exceeded. Parser bailed out for this query. So this bug might be about decreasing memory usage, if it is possible.. In mean time use workaround of lowering parser_max_mem_size