Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Syntax compatibility issue. A simple test may be that the ESCAPE keyword is incompatible. The error is 'Encountered: IDENTIFIER' #46771

Open
2 of 3 tasks
UoweMe opened this issue Jan 10, 2025 · 1 comment
Assignees

Comments

@UoweMe
Copy link

UoweMe commented Jan 10, 2025

Search before asking

  • I had searched in the issues and found no similar issues.

Version

unknown

What's Wrong?

sql:
select org_id from pfma_ods_moon_org where org_lvl LIKE concat('123', '%') ESCAPE '@' LIMIT 0, 10

error message:
java.sql.SQLException: errCode = 2, detailMessage = Syntax error in line 1:
...l` LIKE concat('0', '%') ESCAPE '@' LIMIT 0, 10
^
Encountered: IDENTIFIER
Expected: ||, COMMA

at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:130)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:972)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:213)

What You Expected?

I hope to solve this problem or provide a solution to circumvent it in the future.

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@yx-keith
Copy link

I will pick this, please assign it to me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants