Skip to content

Support MariaDB with SHOW vitess_replication_status#8986

Merged
deepthi merged 1 commit intovitessio:mainfrom
planetscale:ShowVitessReplicationStatusMariaDBMain
Oct 19, 2021
Merged

Support MariaDB with SHOW vitess_replication_status#8986
deepthi merged 1 commit intovitessio:mainfrom
planetscale:ShowVitessReplicationStatusMariaDBMain

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)

This is a forward port of #8985

Checklist

  • Should this PR be backported?
  • 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>
@deepthi deepthi merged commit 3309040 into vitessio:main Oct 19, 2021
@deepthi deepthi deleted the ShowVitessReplicationStatusMariaDBMain 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