shardingSphere jdbc5.1.1 分库案例中 子查询sql导致全局路由

配置


路由到了自定义的策略

结果还是全局路由

Logic SQL: SELECT t1.art_id, t1.type, t1.cat_id, t1.keyword, t1.user_id, t1.sort_order, t1.title, t1.summary, t1.share_count, t1.views_count, t1.views_count_mul, t1.views_count_base, t1.comment_count commentCount, t1.likes_count, t1.likes_count_mul, t1.likes_count_base, t1.collect_count, t1.STATUS, t1.create_time, t1.publish_time, t1.special_topic_id, t1.special_topic_title, t1.is_special_topic, t1.video_url, t1.video_time, t1.pics, t1.portrait_pics, t1.is_recommend, t1.is_deleted, (SELECT update_time FROM con_circle WHERE 1 = 1 AND con_circle.tenant_id = ‘1’) AS isLike FROM con_article t1 WHERE status = ? AND special_topic_id = ? AND is_special_topic = ? AND is_deleted = 0 AND publish_time <= now() AND t1.tenant_id = ‘1’ ORDER BY publish_time DESC, art_id DESC

这里的sql 去掉 (SELECT update_time FROM con_circle WHERE 1 = 1 AND con_circle.tenant_id = ‘1’) 就能正确路由

有人回复这里的问题吗

京ICP备2021015875号