Chat2DB
Chat2DB copied to clipboard
Bug: Windows client cannot obtain table data after connecting to Mariadb normally
Chat2DB Version
v3.0.10
Describe the bug
Connect to the local Mariadb database (TEST environment) normally. After selecting the database, double-click the table name or SQL query table content and it will prompt (conn=794) No database selected, and the conn parameter will increase randomly.
The picture below shows the environment software and hardware information
The picture below shows the error reporting interface
The following is the log information
2023-11-10 16:53:36.558 INFO 3260 --- [http-nio-0.0.0.0-10824-exec-1] ai.chat2db.spi.sql.SQLExecutor .184 : 8024b1cbbec04cbe900414de800aa358 | execute:SELECT * FROM
busi_defence_model
2023-11-10 16:53:36.559 WARN 3260 --- [http-nio-0.0.0.0-10824-exec-1] a.c.s.d.core.impl.DlTemplateServiceImpl .441 : 8024b1cbbec04cbe900414de800aa358 | 执行sql:SELECT * FROM busi_defence_model
异常
java.sql.SQLTransientConnectionException: (conn=794) No database selected
at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:302)
at org.mariadb.jdbc.export.ExceptionFactory.create(ExceptionFactory.java:370)
at org.mariadb.jdbc.message.ClientMessage.readPacket(ClientMessage.java:137)
at org.mariadb.jdbc.client.impl.StandardClient.readPacket(StandardClient.java:840)
at org.mariadb.jdbc.client.impl.StandardClient.readResults(StandardClient.java:779)
at org.mariadb.jdbc.client.impl.StandardClient.readResponse(StandardClient.java:698)
at org.mariadb.jdbc.client.impl.StandardClient.execute(StandardClient.java:641)
at org.mariadb.jdbc.Statement.executeInternal(Statement.java:935)
at org.mariadb.jdbc.Statement.execute(Statement.java:1061)
at org.mariadb.jdbc.Statement.execute(Statement.java:452)
at ai.chat2db.spi.sql.SQLExecutor.execute(SQLExecutor.java:195)
at ai.chat2db.server.domain.core.impl.DlTemplateServiceImpl.execute(DlTemplateServiceImpl.java:439)
at ai.chat2db.server.domain.core.impl.DlTemplateServiceImpl.executeSQL(DlTemplateServiceImpl.java:161)
at ai.chat2db.server.domain.core.impl.DlTemplateServiceImpl.execute(DlTemplateServiceImpl.java:83)
at ai.chat2db.server.web.api.controller.rdb.RdbDmlController.manage(RdbDmlController.java:53)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)
at ai.chat2db.server.web.api.aspect.ConnectionInfoHandler.connectionInfoHandler(ConnectionInfoHandler.java:61)
at jdk.internal.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:637)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:627)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:71)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:702)
at ai.chat2db.server.web.api.controller.rdb.RdbDmlController$$SpringCGLIB$$0.manage(
2023-11-10 16:53:36.564 DEBUG 3260 --- [http-nio-0.0.0.0-10824-exec-1] a.c.s.d.r.m.OperationLogMapper.insert .137 : 8024b1cbbec04cbe900414de800aa358 | ==> Preparing: INSERT INTO OPERATION_LOG ( gmt_create, gmt_modified, data_source_id, database_name, type, ddl, user_id, status ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ? )
2023-11-10 16:53:36.565 DEBUG 3260 --- [http-nio-0.0.0.0-10824-exec-1] a.c.s.d.r.m.OperationLogMapper.insert .137 : 8024b1cbbec04cbe900414de800aa358 | ==> Parameters: 2023-11-10T16:53:36.561562(LocalDateTime), 2023-11-10T16:53:36.561562(LocalDateTime), 2(Long), envi_control(String), MARIADB(String), SELECT * FROM busi_defence_model
(String), 1(Long), fail(String)
2023-11-10 16:53:36.567 DEBUG 3260 --- [http-nio-0.0.0.0-10824-exec-1] a.c.s.d.r.m.OperationLogMapper.insert .137 : 8024b1cbbec04cbe900414de800aa358 | <== Updates: 1
2023-11-10 16:53:36.577 INFO 3260 --- [http-nio-0.0.0.0-10824-exec-1] a.chat2db.server.start.log.EasyLogSink .73 : 8024b1cbbec04cbe900414de800aa358 | http : POST|/api/rdb/dml/execute|241|"sq":"ELET FRO b*si_*efe*ce_*ode*
;*","ageo":,"pgeSze"200"toal"0,"asNxtPge"tru,"dtaSurcId"2,"ataoureNae":实验室2环境,"dtabseTpe""MAIAD","ataaseame:"evi_ontol""scemaame*:nul}|"suces":tue,errrCoe":ull"erorMssae":ull"daa":{"sl":SELCT * FRM *usi*def*nce*mod*l
""orginlSq*":"ELET FRO b*si_*efe*ce_*ode*
",desripion:nul,"essge""(cnn=94)No ataaseselcte","uccss"fale,"pdaeCont"nul,"hadeLis":["daaTye":CHA2DBROWNUMER""nae":RowNumer""prmarKey:nul,"ommnt"nul,"dfautVaue"nul,"atoIcreent:nul,"ullble:nul,"olunSie":ull"deimaDigts"nul}],datLis":nll,sqlype:"SLEC","asNxtPge"fale,"ageo":,"pgeSze"200"fuzyTtal*:"0*,"draton"nul,"cnEdt":rue"taleNme""b*si_*efe*ce_*ode*
"},"taced":ull"erorDtai*":nll,soltioLin*":n*ll}
Replenish:
The connection database version is as follows:
I just tested it and found that changing the database type to mysql works fine, but choosing mariadb does not work.
The next version will be fixed in 3.0.12, please wait.
try new version