From 0eca30e00ad6debf8fb492353605e0bdffafee3f Mon Sep 17 00:00:00 2001 From: Yushu Qin Date: Sun, 11 Jan 2026 14:32:55 -0800 Subject: [PATCH] [`slack-19.0`]: backport: Increase GTID position column size to LONGBLOB for VReplication (#19119) This backport increases the GTID position column size from BLOB to LONGBLOB in VReplication tables to prevent data truncation for large GTID sets. Backported from vitessio/vitess#19119 Original commit: fc242ffbc5 Changes: - Update schema_version.sql to use LONGBLOB for pos column - Update vreplication.sql to use LONGBLOB for pos column - Update schema tests to reflect new column type Note: Test file changes from upstream were not included as they depend on features not present in slack-19.0 branch. Core schema changes are sufficient. --- go/vt/schemadiff/schema_test.go | 4 ++-- go/vt/sidecardb/schema/vreplication/schema_version.sql | 2 +- go/vt/sidecardb/schema/vreplication/vreplication.sql | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go/vt/schemadiff/schema_test.go b/go/vt/schemadiff/schema_test.go index 0913b9a1165..fd553e48016 100644 --- a/go/vt/schemadiff/schema_test.go +++ b/go/vt/schemadiff/schema_test.go @@ -844,8 +844,8 @@ func TestMassiveSchema(t *testing.T) { id int NOT NULL AUTO_INCREMENT, workflow varbinary(1000) DEFAULT NULL, source mediumblob NOT NULL, - pos varbinary(10000) NOT NULL, - stop_pos varbinary(10000) DEFAULT NULL, + pos longblob NOT NULL, + stop_pos longblob DEFAULT NULL, max_tps bigint NOT NULL, max_replication_lag bigint NOT NULL, cell varbinary(1000) DEFAULT NULL, diff --git a/go/vt/sidecardb/schema/vreplication/schema_version.sql b/go/vt/sidecardb/schema/vreplication/schema_version.sql index 2b7cbc08dec..724d47819e5 100644 --- a/go/vt/sidecardb/schema/vreplication/schema_version.sql +++ b/go/vt/sidecardb/schema/vreplication/schema_version.sql @@ -17,7 +17,7 @@ limitations under the License. CREATE TABLE IF NOT EXISTS schema_version ( id INT NOT NULL AUTO_INCREMENT, - pos VARBINARY(10000) NOT NULL, + pos LONGBLOB NOT NULL, time_updated BIGINT(20) NOT NULL, ddl BLOB DEFAULT NULL, schemax LONGBLOB NOT NULL, diff --git a/go/vt/sidecardb/schema/vreplication/vreplication.sql b/go/vt/sidecardb/schema/vreplication/vreplication.sql index ce9badfd98f..9f1bf6c8596 100644 --- a/go/vt/sidecardb/schema/vreplication/vreplication.sql +++ b/go/vt/sidecardb/schema/vreplication/vreplication.sql @@ -19,8 +19,8 @@ CREATE TABLE IF NOT EXISTS vreplication `id` int NOT NULL AUTO_INCREMENT, `workflow` varbinary(1000) DEFAULT NULL, `source` mediumblob NOT NULL, - `pos` varbinary(10000) NOT NULL, - `stop_pos` varbinary(10000) DEFAULT NULL, + `pos` longblob NOT NULL, + `stop_pos` longblob DEFAULT NULL, `max_tps` bigint NOT NULL, `max_replication_lag` bigint NOT NULL, `cell` varbinary(1000) DEFAULT NULL,