← Back to team overview

maria-developers team mailing list archive

Re: c91ec05e01b: MDEV-20865 Store foreign key info in TABLE_SHARE

 

Hi, Aleksey!

On Dec 18, Aleksey Midenkov wrote:
> On Wed, Dec 4, 2019 at 10:10 PM Sergei Golubchik wrote:
>
> But it's better to be from the other side:
> 
> bool Lex_cstring::strdup(MEM_ROOT *mem_root, const Lex_cstring &src)
> {
>   // allocate and deep-copy from src to this
> }
> 
> I'd really like to use such utility methods instead of C variants like
> thd_make_lex_string().
...
> We better go away from this C service layer of thd_*() functions
> between server and plugins and use class methods instead.

Why is it better? Isn't it just the syntax sugar?

The only effect I can think of - pure C plugins won't be able to use
thd_make_lex_string() if you replace it with a C++ method.

Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx


Follow ups

References