We enabled slow_log to debug slow queries. But In slow_log table sql_text column is BLOB.. It used to work fine before on 5.6 but now shows blob on 5.7
(Clarification) When saving the slowlog to a TABLE
, what happens to BLOBs
and TEXT
strings that cannot be safely stored in some standard column? Apparently, TEXT
values are stored into a BLOB
. In that case, how do I get back the TEXT
in the desired CHARACTER SET
?
-
Writing the slow log to FILE? Or TABLE?Rick James– Rick James2017年04月02日 02:06:50 +00:00Commented Apr 2, 2017 at 2:06
-
slow_log table..Deepak Singhal– Deepak Singhal2017年04月02日 05:26:25 +00:00Commented Apr 2, 2017 at 5:26
1 Answer 1
In 5.7 ; column sql_text is changed to BLOB... Hence, you need to use select CONVERT(sql_text USING utf8 ) from mysql.slow_log ;