Fix dblink bug when dblink sql contains outline

This commit is contained in:
xianyu-w
2023-06-19 03:12:20 +00:00
committed by ob-robot
parent 0a734f9343
commit 13327b58d4
3 changed files with 8 additions and 27 deletions

View File

@ -808,10 +808,10 @@ int ObRawExprPrinter::print(ObOpRawExpr *expr)
}
case T_OP_BOOL:{
CK(1 == expr->get_param_count());
if (print_params_.for_dblink_) {
DATA_PRINTF("(case when (");
if (print_params_.for_dblink_ && lib::is_mysql_mode()) {
DATA_PRINTF("!!(");
PRINT_EXPR(expr->get_param_expr(0));
DATA_PRINTF(") then 1 else 0 end)");
DATA_PRINTF(")");
} else if (expr->has_flag(IS_INNER_ADDED_EXPR)) {
// ignore print inner added expr
PRINT_EXPR(expr->get_param_expr(0));