[CP] fix bug: create table xxx partition by xxx should not succeed when part expr with T_OP_REGEXP
This commit is contained in:
@ -198,6 +198,19 @@ int ObRawExprPartExprChecker::visit(ObOpRawExpr &expr)
|
|||||||
!ob_is_integer_type(type)) {
|
!ob_is_integer_type(type)) {
|
||||||
ret = OB_ERR_VALUES_IS_NOT_INT_TYPE_ERROR;
|
ret = OB_ERR_VALUES_IS_NOT_INT_TYPE_ERROR;
|
||||||
LOG_WARN("part_value_expr type is not correct", K(ret), K(type));
|
LOG_WARN("part_value_expr type is not correct", K(ret), K(type));
|
||||||
|
} else {
|
||||||
|
switch (expr.get_expr_type()) {
|
||||||
|
case T_OP_REGEXP: {
|
||||||
|
ret = OB_ERR_PARTITION_FUNCTION_IS_NOT_ALLOWED;
|
||||||
|
LOG_WARN("invalid partition function", K(ret), "item_type", expr.get_expr_type());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
if (OB_FAIL(default_check_args(expr))) {
|
||||||
|
LOG_WARN("default_check_args failed", K(ret));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user