[CP] fix select * in exists

This commit is contained in:
hy-guo
2024-08-22 04:18:02 +00:00
committed by ob-robot
parent b72d6286bd
commit 78a2108dc6
7 changed files with 44 additions and 9 deletions

View File

@ -1673,10 +1673,6 @@ simple_expr collation %prec NEG
}
| EXISTS select_with_parens
{
/* mysql 允许 select * from dual 出现在 exists 中, 此处更改 from dual 的 select list 为常量 1 */
if (NULL == $2->children_[PARSE_SELECT_FROM]) {
$2->value_ = 2;
}
malloc_non_terminal_node($$, result->malloc_pool_, T_OP_EXISTS, 1, $2);
}
| MATCH '(' column_list ')' AGAINST '(' search_expr opt_mode_flag ')'