Skip to content

Commit

Permalink
fix SELECT
Browse files Browse the repository at this point in the history
	*
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
  • Loading branch information
junwen12221 committed Feb 22, 2021
1 parent 593ecd7 commit 0da2774
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hbt/src/main/java/io/mycat/DrdsRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 0da2774

Please sign in to comment.