Skip to content

Support MariaDB with SHOW vitess_replication_status#8985

Merged
deepthi merged 1 commit intovitessio:release-12.0from
planetscale:ShowVitessReplicationStatusMariaDB
Oct 19, 2021
Merged

Support MariaDB with SHOW vitess_replication_status#8985
deepthi merged 1 commit intovitessio:release-12.0from
planetscale:ShowVitessReplicationStatusMariaDB

Conversation

@mattlord
Copy link
Copy Markdown
Member

@mattlord mattlord commented Oct 13, 2021

Description

When adding this command (in #8900) I leveraged the SHOW SLAVE STATUS command against the database instances because that was the lowest common denominator across our supported databases -- MariaDB did not have the replication status related performance_schema tables.

But, what I didn't realize at the time was that MariaDB has added columns to the SHOW SLAVE/REPLICA STATUS output and some of these new columns were injected into the middle of the schema rather than appended. This means that in order to support MariaDB with this Vitess command we need to reference the column values by name rather than by index. See:

Note: once all supported databases support the SHOW REPLICA STATUS query then we can make the inclusive naming changes.

Related Issue(s)

Forward port is here: #8986

Checklist

  • Should this PR be backported? No, but it needs to be added on main too
  • Tests were added or are not required
  • Documentation was added or is not required

When adding this command I leveraged the SHOW SLAVE STATUS
command against the database instances because that was the
lowest common denominator across our supported databases
-- MariaDB did not have the replication status related
performance_schema tables.

BUT, what I didn't realize at the time was that MariaDB has
added columns to the SHOW SLAVE/REPLICA STATUS output and
some of these new columns were injected into the middle of
the schema rather than appended. This means that in order
to support MariaDB with this command we need to reference
the column values by name rather than by index. See:
  - https://dev.mysql.com/doc/refman/en/replication-administration-status.html
  - https://mariadb.com/kb/en/show-replica-status/

Note: once all supported databases support the SHOW REPLICA
STATUS query then we can make the inclusive naming changes.

Signed-off-by: Matt Lord <mattalord@gmail.com>
Copy link
Copy Markdown
Collaborator

@systay systay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@systay systay added the Backport This is a backport label Oct 13, 2021
@deepthi deepthi merged commit 3e753d8 into vitessio:release-12.0 Oct 19, 2021
@deepthi deepthi deleted the ShowVitessReplicationStatusMariaDB branch October 19, 2021 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants