未验证 提交 ecd235de 编写于 作者: G gitccl 提交者: GitHub

fix segmentation fault when meeting 'select * from t where 2 > 1' (#114)

上级 a2e7959d
...@@ -290,6 +290,8 @@ IndexScanOperator *try_to_create_index_scan_operator(FilterStmt *filter_stmt) ...@@ -290,6 +290,8 @@ IndexScanOperator *try_to_create_index_scan_operator(FilterStmt *filter_stmt)
if (left->type() == ExprType::FIELD && right->type() == ExprType::VALUE) { if (left->type() == ExprType::FIELD && right->type() == ExprType::VALUE) {
} else if (left->type() == ExprType::VALUE && right->type() == ExprType::FIELD) { } else if (left->type() == ExprType::VALUE && right->type() == ExprType::FIELD) {
std::swap(left, right); std::swap(left, right);
} else {
continue;
} }
FieldExpr &left_field_expr = *(FieldExpr *)left; FieldExpr &left_field_expr = *(FieldExpr *)left;
const Field &field = left_field_expr.field(); const Field &field = left_field_expr.field();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册