maria-developers team mailing list archive
Mailing list archive
On 10/03/2018 05:33 PM, jerome brauge wrote:
> Hello Alexander,
> Can you review this patch for MDEV-17359 ?
> Best regards.
Thanks for you contribution!
I noticed that Oracle also supports concatenation in the ESCAPE clause:
SELECT 'x' FROM DUAL WHERE 'a' LIKE 'b' ESCAPE ''||'x'||'';
This can be done separately, or can be addressed in the same patch, if
you wish :)
I've been trying to gradually make the two *.yy files as similar as
possible, to turn them into a single *.yy at the end.
So new changes in the grammar should usually make the two files look
more similar rather than make them diverge.
However, it seems in case of concatenation and like, having
only a pair of MYSQL_CONCAT_SYM and ORACLE_CONCAT_SYM does
not solve the problem. I could not make a quick patch which would
converge sql_yacc.yy and sql_yacc_ora.yy.
It's likely that we'll have to introduce separate MYSQL_LIKE_SYM
and ORACLE_LIKE_SYM. But I can do it separately later (after more
I the meanwhile, could you please rename mysql_concatenation_expr
into oracle_concatenation_expr in sql_yacc_ora.yy, so it looks
| oracle_concatenation_expr ORACLE_CONCAT_SYM simple_expr
$$= new (thd->mem_root)
Item_func_concat_operator_oracle(thd, $1, $3);
if (unlikely($$ == NULL))
Later, when we join the two *.yy files, we will need both
mysql_concatenation_expr (in its current reduction)
and oracle_concatenation_expr (in your reduction with
ORACLE_CONCAT_SYM and Item_func_concat_operator_oracle) .