← Back to team overview

maria-developers team mailing list archive

Re: c01b3d91690: MDEV-22551 Server crashes in skip_trailing_space upon ANALYZE on table with long unique, or Assertion `marked_for_read()' fails

 

Hi, Sachin!

On Jun 03, Sachin wrote:
> revision-id: c01b3d91690 (mariadb-10.4.11-224-gc01b3d91690)
> parent(s): 0552ed86782
> author: Sachin <sachin.setiya@xxxxxxxxxxx>
> committer: Sachin <sachin.setiya@xxxxxxxxxxx>
> timestamp: 2020-06-02 08:24:13 +0530
> message:
> 
> MDEV-22551 Server crashes in skip_trailing_space upon ANALYZE on table with long unique, or Assertion `marked_for_read()' fails
> 
> If Blob(or parent) field read_set is not set then Do not calc hash in
> that case.

No, I think this is wrong.

The problem, again, is that read_set bits are set incorrectly, and the
fix is, again, to set them correctly, not to perform more read_set
checks at run time.

Think about what's happening here. The server tries to calculate a
generated column value (because gcol is present in read_set) when not
all argument columns were read (because they are not in read_set).

This is an impossible situation, a gcol can _only_ be in read_set if all
its dependencies are also there, you've seen in
TABLE::mark_virtual_columns_for_write() that for every marked gcol all
dependencies are also recursively marked.

So in this case ANALYZE breaks this rule and should be fixed not to do
it. There are two possible fixes - either ANALYZE should mark
dependencies for all gcols (marking blobs in this bug) or ANALYZE should
skip and not mark gcols. Better ask somebody who's more famiiar with
EITS about what fix is preferred.

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