当前使用版本(必填,否则不予处理)
3.4.3.4
该问题是如何引起的?(确定最新版也有问题再提!!!)
多租户模式使用 select database() 会报错 请问下 这种情况怎么处理 非常感谢
重现步骤(如果有就写完整)
确认是 select database() 引起的错误
我配置了 tenantLineHandler 的 ignoreTable tables 但 select database() 这种怎么配置
报错信息
Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: select count(0) from ( select t.table_name, t.table_comment, t.create_time, t.update_time from information_schema.tables t where t.table_schema = (select database()) AND t.table_name NOT LIKE 'qrtz_%' AND t.table_name NOT LIKE 'gen_%' AND t.table_name NOT IN (select gt.table_name from gen_table gt) ) tmp_count] with root cause net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "=" "=" at line 3, column 24.
Comment From: 1801210430
啥原因哇。
找到了。。。mapper对应方法上加注解@InterceptorIgnore(tenantLine = "true") 或者关闭多租户