[CX] Explain plan button fails in the Analytics workbench when query has 'SET' statement
Description
Components
Affects versions
Fix versions
Labels
Environment
None
Link to Log File, atop/blg, CBCollectInfo, Core dump
None
Release Notes Description
None
relates to
Activity
Show:
CB robot March 18, 2019 at 1:23 PM
Build couchbase-server-6.5.0-2660 contains cbas-ui commit d8f601c with commit message:
https://couchbasecloud.atlassian.net/browse/MB-32939#icft=MB-32939: Allow Auto-Explain In Multi-Statements
CB robot March 14, 2019 at 9:55 PM
Build couchbase-server-6.0.2-2333 contains cbas-ui commit d8f601c with commit message:
https://couchbasecloud.atlassian.net/browse/MB-32939#icft=MB-32939: Allow Auto-Explain In Multi-Statements
Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Assignee
Reporter
Dmitry Lychagin
Dmitry Lychagin(Deactivated)Is this a Regression?
Unknown
Triage
Untriaged
Sprint
None
Priority
Major
Instabug
Open Instabug
PagerDuty
PagerDuty Incident
PagerDuty Incident
Sentry
Linked Issues
Linked Issues
Zendesk Support
Linked Tickets
Linked Tickets
Created February 5, 2019 at 9:52 PM
Updated March 18, 2019 at 1:48 PM
Resolved March 14, 2019 at 9:57 PM
Instabug
"Explain" button returns syntax error in the Analytics Workbench if a query text contains SET statement.
To reproduce
1. Go to analytics workbench
2. Type the following query
set `inline_with` `false`;
LET x = random(), y = tostring:cross_mark:
FROM range(1,1) r
SELECT x, y
3. Press "Explain" button
4. Error:
[
{
"code": 24000,
"msg": "Syntax error: In line 1 >>explain set `inline_with` `false`;<< Encountered \"set\" at column 9. ",
"query_from_user": "set `inline_with` `false`;\nLET x = random(), y = tostring:cross_mark:\nFROM range(1,1) r\nSELECT x, y"
}
]
Workaround: manually add EXPLAIN after the SET statement:
set `inline_with` `false`;
EXPLAIN LET x = random(), y = tostring:cross_mark:
FROM range(1,1) r
SELECT x, y
"Explain" button works fine with this query.