Skip to content

Commit

Permalink
issue-731: collect gtid_purged
Browse files Browse the repository at this point in the history
  • Loading branch information
shunki-fujita committed Aug 22, 2024
1 parent c42f356 commit 60e88f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/dbop/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var _ = Describe("status", func() {
Expect(err).NotTo(HaveOccurred())
Expect(status).NotTo(BeNil())
Expect(status.GlobalVariables.ExecutedGTID).To(BeEmpty())
Expect(status.GlobalVariables.PurgedGTID).To(BeEmpty())
Expect(status.GlobalVariables.ReadOnly).To(BeTrue())
Expect(status.GlobalVariables.SuperReadOnly).To(BeTrue())
Expect(status.GlobalVariables.WaitForSlaveCount).To(Equal(1))
Expand All @@ -43,6 +44,7 @@ var _ = Describe("status", func() {
Expect(err).NotTo(HaveOccurred())
Expect(status).NotTo(BeNil())
Expect(status.GlobalVariables.ExecutedGTID).NotTo(BeEmpty())
Expect(status.GlobalVariables.PurgedGTID).To(BeEmpty())
Expect(status.GlobalVariables.ReadOnly).To(BeFalse())
Expect(status.GlobalVariables.SuperReadOnly).To(BeFalse())
Expect(status.GlobalVariables.WaitForSlaveCount).To(Equal(1))
Expand Down
1 change: 1 addition & 0 deletions pkg/dbop/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var statusGlobalVars = []string{
type GlobalVariables struct {
UUID string `db:"@@server_uuid"`
ExecutedGTID string `db:"@@gtid_executed"`
PurgedGTID string `db:"@@gtid_purged"`
ReadOnly bool `db:"@@read_only"`
SuperReadOnly bool `db:"@@super_read_only"`
WaitForSlaveCount int `db:"@@rpl_semi_sync_master_wait_for_slave_count"`
Expand Down

0 comments on commit 60e88f5

Please sign in to comment.