← Back to team overview

maria-developers team mailing list archive

Re: ce4f8955d8d: MDEV-17082 Application period tables: CREATE

 

Hi, Nikita!

On Jan 30, Nikita Malyavin wrote:
> >
> > In a similar case I used something like
> >
> > #define SIZE 2
> > #define uintSIZEkorr(X) uint2korr(X)
> >
> > This way there are no magically-looking numbers. You can even
> > write `uint ## SIZE ## korr`, if you're feeling adventurous.
> >
> Thanks for advice! Looks suitable enough
> I will just make #define korr2size 2. But it should be shared between
> table.cc and unireg.cc.
> Can You suggest me where to put it?

As you like. table.h, perhaps?

> > The another problem is that sizeof(uint16) is already used in system
> > > versioning, few lines below, so the resulting code will look patchy
> > > here.
> > >
> > > > > +    my_error(ER_PERIOD_FIELD_WRONG_ATTRIBUTES, MYF(0),
> > > > > +             f->field_name.str, "VIRTUAL or GENERATED");
> > > >
> > > > just use "GENERATED", no English in the error message
> > > > parameters, please.
> > > >
> > > VIRTUAL/GENERATED? What'd You say?
> >
> > You cannot have parts of an English phrase as a parameter.
> >
> Well, I agree that 'slash' ('/') is a sintactic element, but was
> considering it language-independent. Ok then.

Sorry, I misunderstood. I meant that you should not write
"VIRTUAL or GENERATED" because it's English.

If you'd like to write "VIRTUAL/GENERATED" - that's language
independent, and from that point of view it's fine.

But writing "VIRTUAL/GENERATED" is like writing "apples/fruits" or
"dogs/animals". VIRTUAL and GENERATED are not two alternatives. VIRTUAL
is a specialization of GENERATED. Every VIRTUAL column is necessarily
GENERATED. And any GENERATED column is necessarily either VIRTUAL or
PERSISTENT.

That's why I said there's no need to write "VIRTUAL/GENERATED",
it's enough to say simply "GENERATED", because it covers all
possibilities.

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx


Follow ups

References