← Back to team overview

maria-developers team mailing list archive

Re: MDEV-17359

 

Jerome,

Can you please wait. I'll do some more analysis on the subject.


On 10/04/2018 09:16 AM, Alexander Barkov wrote:
>   Hello Jerome,
> 
> 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 :)
> 
> 
> Review comments:
> 
> 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
> analysis).
> 
> 
> I the meanwhile, could you please rename mysql_concatenation_expr
> into oracle_concatenation_expr in sql_yacc_ora.yy, so it looks
> like this:
> 
> 
> oracle_concatenation_expr:
>            simple_expr
>         | oracle_concatenation_expr ORACLE_CONCAT_SYM simple_expr
>            {
>              $$= new (thd->mem_root)
> Item_func_concat_operator_oracle(thd, $1, $3);
>              if (unlikely($$ == NULL))
>                MYSQL_YYABORT;
>            }
>         ;
> 
> 
> 
> 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) .
> 
> 
> Thanks.
> 


Follow ups

References