spring-projects / spring-data-r2dbc

Provide support to increase developer productivity in Java when using Reactive Relational Database Connectivity. Uses familiar Spring concepts such as a DatabaseClient for core API usage and lightweight repository style data access.
Apache License 2.0
708 stars 132 forks source link

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 #745

Open sysmat opened 2 years ago

sysmat commented 2 years ago
sysmat commented 2 years ago
2022-03-24 07:21:42.623 ERROR 20852 --- [-netty-thread-1] c.g.jasync.sql.db.mysql.MySQLConnection  : <mysql-connection-1> Received an error message -> ErrorMessage(errorCode=1064, sqlState=#42000, errorMessage=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1)
2022-03-24 07:21:42.692 ERROR 20852 --- [-netty-thread-2] c.g.jasync.sql.db.mysql.MySQLConnection  : <mysql-connection-2> Received an error message -> ErrorMessage(errorCode=1064, sqlState=#42000, errorMessage=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1)
Caused by: io.r2dbc.spi.R2dbcBadGrammarException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
    at dev.miku.r2dbc.mysql.ExceptionFactory.createException(ExceptionFactory.java:81) ~[r2dbc-mysql-0.8.2.RELEASE.jar:0.8.2.RELEASE]
sysmat commented 2 years ago
mp911de commented 2 years ago

If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal sample that reproduces the problem.

sysmat commented 2 years ago

is there any spring property for r3dbc that will log SQL statements, like spring.jpa.show-sql?

mp911de commented 2 years ago

You can enable debug logging if you set the logger org.springframework.r2dbc.core to DEBUG.

sysmat commented 2 years ago