← Back to team overview

maria-developers team mailing list archive

Re: ef70e809a40: MDEV-27217 DELETE partition selection doesn't work for history partitions


Hi, Aleksey!

On Jan 12, Aleksey Midenkov wrote:
> revision-id: ef70e809a40 (mariadb-10.3.31-80-gef70e809a40)
> parent(s): 88f8aa20bba
> author: Aleksey Midenkov
> committer: Aleksey Midenkov
> timestamp: 2021-12-23 04:15:39 +0300
> message:
> MDEV-27217 DELETE partition selection doesn't work for history partitions
> LIMIT history switching requires the number of history partitions to
> be marked for read: from first to last non-empty plus one empty. The
> least we can do is to fail with error message if the needed partition
> was not marked for read. As this is handler interface we require new
> handler error code to display user-friendly error message.
> Switching by INTERVAL works out-of-the-box with

Code-wise it's pretty much fine.
Two problems related to error messages:

We cannot have part of the error message a hard-coded English phrase.
It doesn't work with localized error messages:

   "Невозможно выбрать раздел: modifying system versioned table"

Also we cannot add new error messages in 10.3. Or any old GA.
Currently you can add new error messages to 10.6 or any later version.

You can reuse ER_UNUSED_1 for your new error message, that'll work.
And, because you cannot have English phrases in it, I'd suggest
something more generic, like

  Not allowed for system-versioned table %`s.%`s

In the context of

 delete from t1 partition (p1);
 ERROR HY000: Not allowed for system-versioned table `test`.`t1`

it seems to be quite clear.

VP of MariaDB Server Engineering
and security@xxxxxxxxxxx

Follow ups