4

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?

Rick James
80.7k5 gold badges52 silver badges119 bronze badges
asked Apr 1, 2017 at 12:47
2
  • Writing the slow log to FILE? Or TABLE? Commented Apr 2, 2017 at 2:06
  • slow_log table.. Commented Apr 2, 2017 at 5:26

1 Answer 1

8

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 ;

answered Apr 1, 2017 at 12:56

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.