Bug #95028 MySQL Work Bench 8.0 vs MySqL 5.7.25-Obuntu0.16.04.2
Submitted: 15 Apr 2019 14:44 Modified: 21 May 2019 10:21
Reporter: Ed Scott Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S7 (Test Cases)
Version:8.0.15, 8.0.16 OS:Windows (Microsoft Windows 10 Pro)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[15 Apr 2019 14:44] Ed Scott
Description:
I have several SPROCS on our version of MySQL that I would interact with okay with the previous version of MySQL Workbench that I was using prior to the update to 8.0.  I don't know what version this was.  These SPROCS have comments throughout them.

When I try to open one of them now, in 8.0, I get this message:  "Error Parsing DLL for <sproc name>  There was an error while parsing the DLL retrieved from the server.  Do you want to view the DLL or cancel processing it?"

I go ahead an open it and notice that all of my comments are missing.

As I said, the previous version of MySQL Work Bench would open this SPROC without issue.

How to repeat:
I no idea for how you can replicate this issue.  I suspect that you'll need a  MySqL 5.7.25-Obuntu0.16.04.2 instance along with whatever the previous version of the Work Bench was along with a SPROC that has comments in it.

Seems like my comments were of the -- variety.
[15 Apr 2019 15:27] Ed Scott
It looks like it has to do with how at least one of the following lines is being parsed in 8.0:

      			(select	trim(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(pm.meta_value,'(',''),')',''),'.',''),'-',''),'_',''),'\\',''),'/',''),'|',''),',',''),'*',''),'`',''),'#',''))
					from wp_postmeta	pm
					where	pm.post_id 	= p.ID						AND
							pm.meta_key	= '_billing_phone'
				)															as 'BillingPhone',				 

      			(select	trim(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(pm.meta_value,'(',''),')',''),'.',''),'-',''),'_',''),'\\',''),'/',''),'|',''),',',''),'*',''),'`',''),'#',''))
					from wp_postmeta	pm
					where	pm.post_id 	= p.ID						AND
							pm.meta_key	= '_shipping_phone'
				)															as 'ShippingPhone',				 

      			(select	trim(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(pm.meta_value,'(',''),')',''),'.',''),'-',''),'_',''),'\\',''),'/',''),'|',''),',',''),'*',''),'`',''),'#',''))
					from wp_postmeta	pm
					where	pm.post_id 	= p.ID						AND
							pm.meta_key	= 'purchased_for_phone'
				)															as 'PurchasedForPhone',				

It may be that I don't have something singled quoted correctly or I need to escape something, but whatever the issue, it means one of two things:

1. The current version of Work Bench doesn't parse the above correctly.
2. The earlier version of Work Bench didn't parse the above correctly.
[25 Apr 2019 18:14] Ed Scott
Here is a query example that illustrates the issue:

set @testvalue = '```asfdsfoie`jasfdajsf`';

select 
	'a'			as 'Field1',
    'b'			as 'Field2',
    
    trim(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(@testvalue,'(',''),')',''),'.',''),'-',''),'_',''),'\\',''),'/',''),'|',''),',',''),'*',''),'`',''),'#',''))
				as 'Field3';

The query shows a couple of parsing errors in the dev environment, but it'll run interactively.  It will NOT compile into a SPROC.
[21 May 2019 10:21] MySQL Verification Team
Hello Ed Scott,

Thank you for the report and test case.
Verified as described on WIn10 with WB 8.0.16.

regards,
Umesh