You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/10/26 01:46:15 UTC
[GitHub] [shardingsphere] WilliamShoww opened a new issue #7911: SQL parser error
WilliamShoww opened a new issue #7911:
URL: https://github.com/apache/shardingsphere/issues/7911
## Bug Report
### version: sharding-jdbc-spring-boot-starter:4.1.1
### ShardingSphere-JDBC
### expecte: No error
### now: Exception
### SQL
```mysql
( SELECT
*,
CASE
WHEN ( pc.from_role_id = 43800 OR pc.from_role_id = 43786 ) THEN
5
WHEN pc.from_role_id = 1 THEN
4
WHEN pc.from_role_id = 1 THEN
3 ELSE 2
END order_no
FROM
post_comment pc
WHERE
pc.comment_id = 1
AND omit = 0
ORDER BY
order_no DESC,
id DESC
LIMIT 2
) UNION ALL
(
SELECT
*,
CASE
WHEN ( pc.from_role_id = 43800 OR pc.from_role_id = 43786 ) THEN
5
WHEN pc.from_role_id = 1 THEN
4
WHEN pc.from_role_id = 1 THEN
3 ELSE 2
END order_no
FROM
post_comment pc
WHERE
pc.comment_id = 1
AND omit = 0
ORDER BY
order_no DESC,
id DESC
LIMIT 2
) UNION ALL
(
SELECT
*,
CASE
WHEN ( pc.from_role_id = 43800 OR pc.from_role_id = 43786 ) THEN
5
WHEN pc.from_role_id = 1 THEN
4
WHEN pc.from_role_id = 1 THEN
3 ELSE 2
END order_no
FROM
post_comment pc
WHERE
pc.comment_id = 1
AND omit = 0
ORDER BY
order_no DESC,
id DESC
LIMIT 2
) UNION ALL
(
SELECT
*,
CASE
WHEN ( pc.from_role_id = 43800 OR pc.from_role_id = 43786 ) THEN
5
WHEN pc.from_role_id = 1 THEN
4
WHEN pc.from_role_id = 1 THEN
3 ELSE 2
END order_no
FROM
post_comment pc
WHERE
pc.comment_id = 1
AND omit = 0
ORDER BY
order_no DESC,
id DESC
LIMIT 2
) UNION ALL
(
SELECT
*,
CASE
WHEN ( pc.from_role_id = 43800 OR pc.from_role_id = 43786 ) THEN
5
WHEN pc.from_role_id = 1 THEN
4
WHEN pc.from_role_id = 1 THEN
3 ELSE 2
END order_no
FROM
post_comment pc
WHERE
pc.comment_id = 1
AND omit = 0
ORDER BY
order_no DESC,
id DESC
LIMIT 2
) UNION ALL
(
SELECT
*,
CASE
WHEN ( pc.from_role_id = 43800 OR pc.from_role_id = 43786 ) THEN
5
WHEN pc.from_role_id = 1 THEN
4
WHEN pc.from_role_id = 1 THEN
3 ELSE 2
END order_no
FROM
post_comment pc
WHERE
pc.comment_id = 1
AND omit = 0
ORDER BY
order_no DESC,
id DESC
LIMIT 2
) UNION ALL
(
SELECT
*,
CASE
WHEN ( pc.from_role_id = 43800 OR pc.from_role_id = 43786 ) THEN
5
WHEN pc.from_role_id = 1 THEN
4
WHEN pc.from_role_id = 1 THEN
3 ELSE 2
END order_no
FROM
post_comment pc
WHERE
pc.comment_id = 1
AND omit = 0
ORDER BY
order_no DESC,
id DESC
LIMIT 2
) UNION ALL
(
SELECT
*,
CASE
WHEN ( pc.from_role_id = 43800 OR pc.from_role_id = 43786 ) THEN
5
WHEN pc.from_role_id = 1 THEN
4
WHEN pc.from_role_id = 1 THEN
3 ELSE 2
END order_no
FROM
post_comment pc
WHERE
pc.comment_id = 1
AND omit = 0
ORDER BY
order_no DESC,
id DESC
LIMIT 2
) UNION ALL
(
SELECT
*,
CASE
WHEN ( pc.from_role_id = 43800 OR pc.from_role_id = 43786 ) THEN
5
WHEN pc.from_role_id = 1 THEN
4
WHEN pc.from_role_id = 1 THEN
3 ELSE 2
END order_no
FROM
post_comment pc
WHERE
pc.comment_id = 1
AND omit = 0
ORDER BY
order_no DESC,
id DESC
LIMIT 2
) UNION ALL
(
SELECT
*,
CASE
WHEN ( pc.from_role_id = 43800 OR pc.from_role_id = 43786 ) THEN
5
WHEN pc.from_role_id = 1 THEN
4
WHEN pc.from_role_id = 1 THEN
3 ELSE 2
END order_no
FROM
post_comment pc
WHERE
pc.comment_id = 1
AND omit = 0
ORDER BY
order_no DESC,
id DESC
LIMIT 2
)
```
### version 3.1.M1 not exception but version 4.1.1 exception
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #7911: SQL parser error
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #7911:
URL: https://github.com/apache/shardingsphere/issues/7911#issuecomment-723525923
Closed because of no response anymore
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] avalon5666 commented on issue #7911: SQL parser error
Posted by GitBox <gi...@apache.org>.
avalon5666 commented on issue #7911:
URL: https://github.com/apache/shardingsphere/issues/7911#issuecomment-716306075
Pls provide a complete exception stack.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu closed issue #7911: SQL parser error
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #7911:
URL: https://github.com/apache/shardingsphere/issues/7911
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org