| 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: | |
| 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
[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
