Bug #96751 | Optimizer trace contains invalid JSON for FORCE INDEX queries | ||
---|---|---|---|
Submitted: | 4 Sep 2019 15:52 | Modified: | 22 Oct 2019 23:02 |
Reporter: | Sergei Petrunia | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 8.0.17-debug | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[4 Sep 2019 15:52]
Sergei Petrunia
[5 Sep 2019 6:32]
MySQL Verification Team
Hello Sergei, Thank you for the report and test case. Verified as described. regards, Umesh
[22 Oct 2019 23:02]
Jon Stephens
Documented fix in the MySQL 8.0.19 changelog as follows: In some cases, such as when a query uses FORCE INDEX, the cost of reading the table is DBL_MAX; this was rounded up to 2e308 when printed, which is too large for the JSON parser, so that it was not possible to extract parts of the optimizer trace using a query such as SELECT JSON_EXTRACT(trace, '$**.table_scan') FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE. Now in such cases, values greater than 1.5e308 are rounded down and printed as 1e308 instead. Closed.
[16 Nov 2020 9:41]
Erlend Dahl
Bug#101430 Invalid JSON number 2e308 in opt trace for FORCE INDEX was marked as a duplicate.