From 0f649f3ea83e70a469808f361fdc0eec081bff22 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Wed, 24 Jul 2024 15:37:03 +0100 Subject: [PATCH] Remove some unused MySQL 5.6 code (#16465) Signed-off-by: Graham Campbell --- go/mysql/binlog_event.go | 2 +- go/mysql/capabilities/capability.go | 3 --- go/mysql/capabilities/capability_test.go | 12 +----------- go/mysql/flavor_mysqlgr_test.go | 12 +----------- go/mysql/flavor_test.go | 5 ----- 5 files changed, 3 insertions(+), 31 deletions(-) diff --git a/go/mysql/binlog_event.go b/go/mysql/binlog_event.go index 84f92c3809d..5e5ce01eac3 100644 --- a/go/mysql/binlog_event.go +++ b/go/mysql/binlog_event.go @@ -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. diff --git a/go/mysql/capabilities/capability.go b/go/mysql/capabilities/capability.go index be574724f0f..34995081867 100644 --- a/go/mysql/capabilities/capability.go +++ b/go/mysql/capabilities/capability.go @@ -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 @@ -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, diff --git a/go/mysql/capabilities/capability_test.go b/go/mysql/capabilities/capability_test.go index 6e96c3487f5..aeb18bed22e 100644 --- a/go/mysql/capabilities/capability_test.go +++ b/go/mysql/capabilities/capability_test.go @@ -145,7 +145,7 @@ func TestMySQLVersionCapableOf(t *testing.T) { isCapable: false, }, { - version: "5.6.7", + version: "5.7.29", capability: InstantDDLFlavorCapability, isCapable: false, }, @@ -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, diff --git a/go/mysql/flavor_mysqlgr_test.go b/go/mysql/flavor_mysqlgr_test.go index 348aefca934..33c6567b888 100644 --- a/go/mysql/flavor_mysqlgr_test.go +++ b/go/mysql/flavor_mysqlgr_test.go @@ -84,7 +84,7 @@ func TestMysqlGRSupportCapability(t *testing.T) { isCapable: false, }, { - version: "5.6.7", + version: "5.7.29", capability: capabilities.InstantDDLFlavorCapability, isCapable: false, }, @@ -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, diff --git a/go/mysql/flavor_test.go b/go/mysql/flavor_test.go index 172ffa67eb2..3d584b8293b 100644 --- a/go/mysql/flavor_test.go +++ b/go/mysql/flavor_test.go @@ -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,