[MDEV-30771] Optimizer trace: table_scan.rows is traced as integer, change to double Created: 2023-03-02 Updated: 2023-03-28 Resolved: 2023-03-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.4, 10.5, 10.6, 10.8, 10.9, 10.10, 10.11, 11.0 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I am looking at 10.6 but earlier versions are likely affected, too. Looking at outputs like this
"cost" is always integer? Please make sure it is written as double in BOTH places, starting from the earliest applicable version. |
| Comments |
| Comment by Rex Johnston [ 2023-03-06 ] |
|
Hi Sergei, as far as i could tell, these are actually doubles and what you are seeing is the result of the printf format %g truncating the number. Attached is my suggestion for making it clear what sort of number is being printed, controlled by some #defines. Unfortunately it's changed a lot of the optimizer trace outputs in mysql-test, but what is truncated is arguably not useful. I've looked through all of them. Thanks, Rex |
| Comment by Sergei Petrunia [ 2023-03-27 ] |
|
Hi Rex, Thanks for pointing this out. "rows" is actually an integer, I got confused as I was thinking we were printing "cost", which is double. Also was looking at a customer's trace where cost happened to be an integer... |
| Comment by Sergei Petrunia [ 2023-03-27 ] |
|
Closing as Not-a-bug |