Skip to content

Commit

Permalink
Remove some unused MySQL 5.6 code (vitessio#16465)
Browse files Browse the repository at this point in the history
Signed-off-by: Graham Campbell <[email protected]>
  • Loading branch information
GrahamCampbell authored Jul 24, 2024
1 parent 36f7193 commit 0f649f3
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 31 deletions.
2 changes: 1 addition & 1 deletion go/mysql/binlog_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ type BinlogFormat struct {
HeaderSizes []byte

// ServerVersion is the name of the MySQL server version.
// It starts with something like 5.6.33-xxxx.
// It starts with something like 8.0.34-xxxx.
ServerVersion string

// FormatVersion is the version number of the binlog file format.
Expand Down
3 changes: 0 additions & 3 deletions go/mysql/capabilities/capability.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const (
InstantAddDropColumnFlavorCapability // Adding/dropping column in any position/ordinal.
InstantChangeColumnDefaultFlavorCapability //
InstantExpandEnumCapability //
MySQLJSONFlavorCapability // JSON type supported
MySQLUpgradeInServerFlavorCapability //
DynamicRedoLogCapacityFlavorCapability // supported in MySQL 8.0.30 and above: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-30.html
DisableRedoLogFlavorCapability // supported in MySQL 8.0.21 and above: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-21.html
Expand Down Expand Up @@ -89,8 +88,6 @@ func MySQLVersionHasCapability(serverVersion string, capability FlavorCapability
}
// Capabilities sorted by version.
switch capability {
case MySQLJSONFlavorCapability:
return atLeast(5, 7, 0)
case InstantDDLFlavorCapability,
InstantExpandEnumCapability,
InstantAddLastColumnFlavorCapability,
Expand Down
12 changes: 1 addition & 11 deletions go/mysql/capabilities/capability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func TestMySQLVersionCapableOf(t *testing.T) {
isCapable: false,
},
{
version: "5.6.7",
version: "5.7.29",
capability: InstantDDLFlavorCapability,
isCapable: false,
},
Expand All @@ -154,16 +154,6 @@ func TestMySQLVersionCapableOf(t *testing.T) {
capability: TransactionalGtidExecutedFlavorCapability,
isCapable: false,
},
{
version: "5.6.7",
capability: MySQLJSONFlavorCapability,
isCapable: false,
},
{
version: "5.7.29",
capability: MySQLJSONFlavorCapability,
isCapable: true,
},
{
version: "8.0.30",
capability: DynamicRedoLogCapacityFlavorCapability,
Expand Down
12 changes: 1 addition & 11 deletions go/mysql/flavor_mysqlgr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func TestMysqlGRSupportCapability(t *testing.T) {
isCapable: false,
},
{
version: "5.6.7",
version: "5.7.29",
capability: capabilities.InstantDDLFlavorCapability,
isCapable: false,
},
Expand All @@ -93,16 +93,6 @@ func TestMysqlGRSupportCapability(t *testing.T) {
capability: capabilities.TransactionalGtidExecutedFlavorCapability,
isCapable: false,
},
{
version: "5.6.7",
capability: capabilities.MySQLJSONFlavorCapability,
isCapable: false,
},
{
version: "5.7.29",
capability: capabilities.MySQLJSONFlavorCapability,
isCapable: true,
},
{
version: "8.0.30",
capability: capabilities.DynamicRedoLogCapacityFlavorCapability,
Expand Down
5 changes: 0 additions & 5 deletions go/mysql/flavor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ func TestServerVersionCapableOf(t *testing.T) {
capability: capabilities.TransactionalGtidExecutedFlavorCapability,
isCapable: false,
},
{
version: "5.7.29",
capability: capabilities.MySQLJSONFlavorCapability,
isCapable: true,
},
{
version: "8.0.30",
capability: capabilities.DynamicRedoLogCapacityFlavorCapability,
Expand Down

0 comments on commit 0f649f3

Please sign in to comment.