Description:
MySQL Workbench hangs and becomes unresponsive when I try to edit a particular SQL query in the editor tab (the hang occurs as soon as I begin typing in the editor window to edit the query).
How to repeat:
The following query causes the problem (some tables disguised to protect identity of website):
use XXXX;
-- identify sources not in query below
-- select name from Source order by name;
select concat('https://www.XXXX.com/admin_chart.php?c=', c.chartid) as admin_chart,
c.chartid, c.title, c.dateupdated, u.username
from Chart c
left join XXX uc on uc.chartid = c.chartid
left join XX u on u.user_id = uc.userid
where
c.sourceid = 1 and
(
title like '%ABC %' or
title like '%Absolute Radio %' or
title like '%Bandcamp %' or
title like '%ABC %' or
title like '%Albumism %' or
title like '%American Songwriter %' or
title like '%Baeble Music %' or
title like '%Bandcamp %' or
title like 'BBC %' or
title like 'BET %' or
title like 'Billboard %' or
title like 'BLARE %' or
title like 'Bleep %' or
title like 'BrooklynVegan %' or
title like 'Channel 4 %' or
title like 'Clash %' or
title like 'Classic Rock %' or
title like 'Complex %' or
title like 'Consequence of Sound %' or
title like 'Cosmopolitan %' or
title like 'Crack Magazine %' or
title like 'Dazed %' or
title like 'Decibel %' or
title like 'Diffuser.fm %' or
title like 'Digital Trends %' or
title like 'Double J %' or
title like 'Drowned in Sound %' or
title like 'Dummy %' or
title like 'Earbuddy %' or
title like 'Entertainment Weekly %' or
title like 'Esquire %' or
title like 'FACT %' or
title like 'FLOOD Magazine %' or
title like 'Fopp %' or
title like 'Fuse %' or
title like 'Gigwise %' or
title like 'God is in the TV %' or
title like 'Gorilla vs. Bear %' or
title like 'Highsnobiety %' or
title like 'HYPEBEAST %' or
title like 'Independent %' or
title like 'Interview Magazine %' or
title like 'Junkee %' or
title like 'KCRW %' or
title like 'Kerrang! %' or
title like 'KEXP %' or
title like 'Les Inrocks %' or
title like 'Loud And Quiet %' or
title like 'Louder Than War %' or
title like 'Mashable %' or
title like 'Mass Appeal %' or
title like 'Melody Maker %' or
title like 'Metal Injection %' or
title like 'Mixmag %' or
title like 'Mojo %' or
title like 'musicOMH %' or
title like 'National Association of Recording Merchandisers %' or
title like 'New Music Express %' or
title like 'NME %' or
title like 'New York Daily News %' or
title like 'Newsweek %' or
title like 'No Ripcord %' or
title like 'Noisey %' or
title like 'Norman Records %' or
title like 'Northern Transmissions %' or
title like 'NOW Toronto %' or
title like 'NPR %' or
title like 'NRK P3 %' or
title like 'NZ Herald %' or
title like 'Okayplayer %' or
title like 'OOR %' or
title like 'Passion of the Weiss %' or
title like 'Paste %' or
title like 'People %' or
title like 'Philly.com %' or
title like 'Piccadilly Records %' or
title like 'Pigeons & Planes %' or
title like 'Pitchfork %' or
title like 'Popjustice %' or
title like 'PopMatters %' or
title like 'Pretty Much Amazing %' or
title like 'Q %' or
title like 'Rap-Up %' or
title like 'Revolver %' or
title like 'Rock Sound %' or
title like 'Rolling Stone %' or
title like 'Rough Trade %' or
title like 'Slant Magazine %' or
title like 'Sound & Vision Magazine %' or
title like 'Spectrum Culture %' or
title like 'Spin %' or
title like 'Sputnik Music %' or
title like 'State %' or
title like 'Stereogum %' or
title like 'STOFF %' or
title like 'TeamRock %' or
title like 'The 405 %' or
title like 'The A.V. Club %' or
title like 'The Alternative %' or
title like 'The Associated Press %' or
title like 'The Atlantic %' or
title like 'The Daily Beast %' or
title like 'The Guardian %' or
title like 'The Guinness Book of British Hit Singles & Albums with NME %' or
title like 'The Line Of Best Fit %' or
title like 'The Needle Drop %' or
title like 'The Quietus %' or
title like 'The Ringer %' or
title like 'The Skinny %' or
title like 'The Times %' or
title like 'The Vinyl Factory %' or
title like 'The Wild Honey Pie %' or
title like 'The Wire %' or
title like 'Thrillist %' or
title like 'TIME %' or
title like 'Time Out %' or
title like 'Tiny Mix Tapes %' or
title like 'Treble %' or
title like 'Uncut %' or
title like 'Under The Radar %' or
title like 'Uproxx %' or
title like 'Upset %' or
title like 'VH1 %' or
title like 'Village Voice %' or
title like 'Vinyl Me, Please. %' or
title like 'Virgin %' or
title like 'Vive Le Rock! %' or
title like 'Vulture %' or
title like 'Yahoo! Music %' or
-- user charts
title like 'Classic Pop Magazine %' or
title like 'Classic Rock Magazine %' or
title like '%Entertainment Weekly %' or
title like '%Earbuddy %' or
title like '%nme %' or
title like '%melody maker %' or
title like '%pitchfork %' or
title like '%mojo %' or
title like '%q %' or
title like '%rolling stone %' or
title like '%sounds %' or
title like '%uncut %'
)
and c.chartid not in (12038,15317,12038,16189,45073,44581,44723,44580,15566,15301)
-- exclude known patterns
and title NOT like 'state lists: %'
order by c.chartid asc; -- oldest chart listed first
Suggested fix:
The application should not hang when editing the query.