-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve the backward compatibility of “SHOW SLAVE HOSTS“ command #5017
Labels
Comments
duanhuichao
added
area/dm
Issues or PRs related to DM.
type/bug
The issue is confirmed as a bug.
labels
Mar 25, 2022
duanhuichao
pushed a commit
to duanhuichao/tiflow
that referenced
this issue
Mar 25, 2022
Problem: With the version upgrade, on the new version of MySQL Cluster, the query results of many system commands will display some new columns. These new columns show new features or information of MySQL. In general, it is recommended to provide backward compatibility of system commands (e.g., show xxx) rather than hard-coded return value format (i.e., limiting the number of returned columns). For DM, there are some commands that are difficult to backward-compatible: (1) SHOW MASTER STATUS (2) SHOW SLAVE HOSTS (3) SHOW BINARY LOGS Fix: Through the reflection mechanism, we only take the value of the required corresponding column and do not limit the number of returned columns. This patch removes the limit on the number of columns returned by the 'show slave hosts' command. ref pingcap#2017
duanhuichao
pushed a commit
to duanhuichao/tiflow
that referenced
this issue
Mar 25, 2022
Problem: With the version upgrade, on the new version of MySQL Cluster, the query results of many system commands will display some new columns. These new columns show new features or information of MySQL. In general, it is recommended to provide backward compatibility of system commands (e.g., show xxx) rather than hard-coded return value format (i.e., limiting the number of returned columns). For DM, there are some commands that are difficult to backward-compatible: (1) SHOW MASTER STATUS (2) SHOW SLAVE HOSTS (3) SHOW BINARY LOGS Fix: Through the reflection mechanism, we only take the value of the required corresponding column and do not limit the number of returned columns. This patch removes the limit on the number of columns returned by the 'show slave hosts' command. ref pingcap#5017
lance6716
added
type/feature
Issues about a new feature
and removed
type/bug
The issue is confirmed as a bug.
labels
Mar 31, 2022
Hi, which version of MySQL addes new columns? And please address comment in your PR |
Hello,I encountered the same problem in txsql 8.0.22 patch 20210330 |
happens again https://asktug.com/t/topic/813202 |
/assign @lyzx2001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What did you do?
With the version upgrade, on the new version of MySQL Cluster, the query results of many system commands will display some new columns. These new columns show new features or information of MySQL.
In general, it is recommended to provide backward compatibility of system commands (e.g., show xxx) rather than hard-coded return value format (i.e., limiting the number of returned columns).
For DM, there are some commands that are difficult to backward-compatible:
(1) SHOW MASTER STATUS
(2) SHOW SLAVE HOSTS
(3) SHOW BINARY LOGS
These commands limit the return format by limiting the number of columns returned:
What did you expect to see?
Through the reflection mechanism, we only take the value of the required corresponding column and do not limit the number of returned columns.
import (
"reflect"
)
see:
https://stackoverflow.com/questions/21986780/is-it-possible-to-retrieve-a-column-value-by-name-using-golang-database-sql
What did you see instead?
For the above system commands, when the number of columns returned by MySQL changes, DM cannot work.
Versions of the cluster
any versions
current status of DM cluster (execute
query-status <task-name>
in dmctl)No response
The text was updated successfully, but these errors were encountered: