From 0da2774daa1c67deaae9829bef34e7839164216a Mon Sep 17 00:00:00 2001 From: jamie Date: Mon, 22 Feb 2021 20:05:39 +0800 Subject: [PATCH] fix SELECT * FROM mysql.role_edges hiib WHERE 1 = 1 AND hiib.FROM_HOST = 'N' AND MOD ( hiib.FROM_HOST, 1 ) = 0 AND hiib.FROM_HOST = 'LWJ_CODE_TEST' AND hiib.FROM_HOST = 21 LIMIT 100 Illegal use of dynamic parameter --- hbt/src/main/java/io/mycat/DrdsRunner.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hbt/src/main/java/io/mycat/DrdsRunner.java b/hbt/src/main/java/io/mycat/DrdsRunner.java index 875bb9e0d..db832b3e4 100644 --- a/hbt/src/main/java/io/mycat/DrdsRunner.java +++ b/hbt/src/main/java/io/mycat/DrdsRunner.java @@ -444,7 +444,10 @@ private RelNode getRelRoot(String defaultSchemaName, MycatCalciteSupport.INSTANCE.getValidatorConfig()) { @Override protected void inferUnknownTypes(@Nonnull RelDataType inferredType, @Nonnull SqlValidatorScope scope, @Nonnull SqlNode node) { - + if (node!=null&&node instanceof SqlDynamicParam){ + RelDataType relDataType = deriveType(scope, node); + return; + } super.inferUnknownTypes(inferredType, scope, node); }