Bug #94094 MySQL Workbench hangs when editing SQL query
Submitted: 28 Jan 2019 9:36 Modified: 4 Dec 2019 13:39
Reporter: Jon Jo Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S1 (Critical)
Version:8.0.13 OS:Windows (Microsoft Windows 10 Pro)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[28 Jan 2019 9:36] Jon Jo
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.
[28 Jan 2019 10:24] MySQL Verification Team
Thank you for the bug report. Duplicate/related to bug https://bugs.mysql.com/bug.php?id=92015.
[4 Dec 2019 12:53] Jorge Rojas
Dear Jon,

I have the same issue (so you are no alone, hangs editing a specific line on a big query and I have to finalize the process).

Did you got feedback or a workaround?

Regards,

Jorge
[4 Dec 2019 13:39] Jon Jo
Sorry, not sure how to respond directly to Jorge, but no workaround except editing the query outside of Workbench (e.g. in Notepad) and pasting the code into the editor to avoid triggering auto-complete.
[5 Feb 2021 16:10] Jim Erickson
same nearly exact situation. This is really a bad developer job. it used to work just fine years ago
[5 Apr 2022 16:28] Gary Lesperance
I just turned off autocomplete Edit->Preferences and it fixed the problem.
[17 Mar 2023 2:00] 蒒 明
It happens to version 8.0.29 too.
It happens when many similar where clause is typed in. 
untick "Enable code completion in Editors" resolve the problem.
[13 Aug 2023 18:58] randall newman
Its now a few years later and still seeing this problem.
Disabling code completion resolved for me too.
[21 Sep 2023 17:28] paul watje
Still have the problem in 8.0.34 and still fixed by turning off code complete option