← Back to team overview

maria-developers team mailing list archive

Re: (no subject)

 

Игорь, salute!

> Hello mariaDB developers!

It's so nice to have someone willing to revive mysqltest :-)!

> I am a participant of GSOC 2020 mentored by Nikita Malyavin and Sergey Golubchik.
> Currently I am working on mysqltest parser improvements and I have a question to discuss with everyone:
>
> To be short:
>
> Currently there are expressions in if and while to be calculated
> i.e
>
>     if(<expr>)
>     code
>     But it is written using switch and works only in condition block.
>    
> Code like:
>
>     let $a= 1 + 2
>     Makes $a = "1 + 2"
>
> Obviously mysqltest syntax needs proper expressions thats why I decided to make them.
> There are following questions:
>
> What syntax do you want to see?
>
>     let $a = 1 + 2
>     $a = 3
>     Is a bad idea because we will break lots of previous taest cases.
>    
>     let $a = $((1 + 2))
>     That is done in a bash style, so it seems to be more comfortable to everyone.

Alternatively to $(()) -
let $a = `1 + 2`

  or even

$a = 1 + 2

the let-free form that may allow for simplifying the rhs to be also free
from and evaluation hints/operators.
We don't have the let-free assignment as of current, so this seems
possible and new tests (writers :-)) would obviously prefer that.

>    
> Another question is what operators should be in expressions?
> To begin with I want to implement:
>
> +, -. *, /, ++, --, <, >, ==, !=

`%' - the reminder is very popular. `/' I read would result in a
quotient (the whole part of devision).

>
> To implement expressions I want to use Byson to make it easier to rewrite parser if needed
>
> I would be glad to read feedback and critique.

That *will* be coming ! :-)

Cheers,

Andrei Elkin, Replication



References