Done
Details
Assignee
Laurynas BiveinisLaurynas Biveinis(Deactivated)Reporter
Tomislav PlavcicTomislav PlavcicLabels
Time tracking
6h 31m loggedFix versions
Affects versions
Priority
Medium
Details
Details
Assignee
Laurynas Biveinis
Laurynas Biveinis(Deactivated)Reporter
Tomislav Plavcic
Tomislav PlavcicLabels
Time tracking
6h 31m logged
Fix versions
Affects versions
Priority
Smart Checklist
Smart Checklist
Smart Checklist
Created November 7, 2018 at 4:12 PM
Updated March 6, 2024 at 12:42 PM
Resolved December 18, 2018 at 5:26 PM
I have executed some query in 8.0.12 which creates an in memory temp table, this is what I got in the slow query log:
Comment:
1. Tmp_disk_tables is 1 here (notice Tmp_table_on_disk in the line below that one is "No" which is inconsistent) - it should be 0 here.
2. Tmp_table_sizes is 0 and I think it should be calculated regardless if temp table is created on disk or in memory.
Here's info from performance schema for this query:
CREATED_TMP_TABLES is 1, but CREATED_TMP_DISK_TABLES is 0
PS 5.7.23 with in memory temp table:
Tmp_disk_tables is 0 here, but Tmp_table_sizes is calculated which I think it should be (so 5.7 seems fine here).
PS 8.0.12 with on disk temp table:
You can see that Tmp_disk_tables is 1 here and Tmp_table_sizes is also calculated - so I would conclude that this affects only queries which create in memory temp tables.
Just for reference PS 5.7.23 with on disk temp table:
Also notice that upstream in 8.0.14 adds a new variable to control format of slow query log:
https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_log_slow_extra
https://dev.mysql.com/doc/refman/8.0/en/slow-query-log.html#slow-query-log-contents
and it will include some of the stuff that we already have and some more so this will be fun all around.
STEPS TO REPRODUCE: