ANALYZE FORMAT=JSON SELECT ... below takes very long time on a debug server (> 1min). Also, it doesn't respect KILL QUERY / max_statement_time limit and remains in "Killed" state holding the table.
On a release server the same query is instantaneous.
I fully realize that debug server is bound to be slower, but I think it's worth checking, when/if priorities permit, whether it should be that much slower.
The SELECT itself, without ANALYZE, is very fast both on debug and non-debug (less than 1 second).
Warning: ANALYZE FORMAT=JSON prints the final generated value of REPEAT('x',50000000), so it will flood the screen and scroll-back history unless you suppress the output or redirect it somewhere.
Important: The test needs to be run with max-allowed-packet=128M or alike. If you run it via MTR, it's --mysqld=--max-allowed-packet=128M. If you run it via command-line client, the option max-allowed-packet=128M should be passed both to the server and to the client.