← Back to team overview

maria-developers team mailing list archive

Re: MDEV 10754 - Patch for trim functions

 

Forgot to mention,


To track changes easier, I made a separate MDEV for this:

MDEV-15664 sql_mode=ORACLE: Make TRIM return NULL instead of empty string

Greetings.


On 03/26/2018 04:21 PM, Alexander Barkov wrote:
> Hello Jerome,
> 
> 
> Thank you for the contribution.
> 
> 
> The patch looks fine. I have only some proposals.
> 
> 
> 1. We don't use bb-10.2-ext any more. Please use 10.3 instead.
> 
> 
> 2. You mapped "TRIM_ORACLE" to SYM(TRIM).
> I guess you wanted to avoid grammar duplication
> for "TRIM" and "TRIM_ORACLE".
> 
> It's good to avoid grammar duplication.
> However, this way introduces some problems:
> - using yyval directly won't work in all cases
> - "TRIM_ORACLE" becomes a reserved word.
>   It must be non-reserved.
> 
> 
> So I propose to do the same thing in a different way:
> 
> - Let's introduce a new rule "trim_operands"
> and a new structure Lex_trim_st to store TRIM operands.
> - Let's have a separate token TRIM_ORACLE
> 
> 
> 3. Create_func_trim_oracle is not really needed.
> 
> 
> Please review a modified patch attached.
> 
> Thanks!
> 
> 
> 
> On 03/15/2018 11:22 AM, jerome brauge wrote:
>> Hello Alexander,
>>
>> Can you review this patch for trim functions for Oracle ?
>>
>>  
>>
>> Regards,
>>
>> Jérôme.
>>


References