当前使用版本(必填,否则不予处理)
3.4.3.4
该问题是如何引起的?(确定最新版也有问题再提!!!)
多租户插件添加后,删除多租户插件程序又多了
重现步骤(如果有就写完整)
SELECT table_name, table_comment, create_time, update_time FROM information_schema. TABLES WHERE table_schema = (SELECT DATABASE()) AND table_name NOT LIKE 'xxl_job_%' AND table_name NOT LIKE 'gen_%' AND table_name NOT IN ( SELECT table_name FROM gen_table ) ORDER BY create_time DESC
报错信息
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: select table_name, table_comment, create_time, update_time from information_schema.tables
where table_schema = (select database())
AND table_name NOT LIKE 'xxl_job_%' AND table_name NOT LIKE 'gen_%'
AND table_name NOT IN (select table_name from gen_table)
order by create_time desc
Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: select table_name, table_comment, create_time, update_time from information_schema.tables
where table_schema = (select database())
AND table_name NOT LIKE 'xxl_job_%' AND table_name NOT LIKE 'gen_%'
AND table_name NOT IN (select table_name from gen_table)
order by create_time desc
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:96)
Comment From: ahgaoyong
是jsqlparser这个jar包的问题, 他不能识别select database(),这个语句, 把这个语句的mapper方法禁用sql解析就行了(添加注解@InterceptorIgnore(tenantLine = "true")即可禁用)
Comment From: ahgaoyong
若依大法就是强
Comment From: chansanya
给老哥点个👍🏻
Comment From: nadirvishun
是jsqlparser这个jar包的问题, 他不能识别select database(),这个语句, 把这个语句的mapper方法禁用sql解析就行了(添加注解@InterceptorIgnore(tenantLine = "true")即可禁用)
怪的是这个注解放到方法上还是会报错,只能放到mapper类上才生效,没弄明白什么原因。