[MDEV-31533] Replication Error with compressed columns Created: 2023-06-23  Updated: 2023-06-27  Resolved: 2023-06-27

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.11.4
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Alex Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Debian



 Description   

I am getting this error while trying to do master-slave replication:

Column 1 of table 'meshok.sale_description' cannot be converted from type 'mediumblob' to type 'mediumtext /*!100301 COMPRESSED*/'

Table definition on master:

CREATE TABLE `sale_description` (
  `id` int(10) unsigned NOT NULL DEFAULT 0,
  `description` mediumtext  NOT NULL,
  `d_add` varchar(1000) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci

Table definition on slave:

CREATE TABLE `sale_description` (
  `id` int(10) unsigned NOT NULL DEFAULT 0,
  `description` mediumtext  /*!100301 COMPRESSED*/ NOT NULL DEFAULT '',
  `d_add` varchar(1000) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci



 Comments   
Comment by Alice Sherepa [ 2023-06-26 ]

Have you set SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY' ?
( https://mariadb.com/kb/en/replication-and-binary-log-system-variables/#slave_type_conversions )

Comment by Alex [ 2023-06-26 ]

This variable is empty.

Comment by Alex [ 2023-06-26 ]

SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY' fixed the problem

Comment by Alex [ 2023-06-27 ]

I think that Error message could be improved to something like:

"Column N of table 'TABLE' cannot be converted from type 'A' to type 'B'. See SLAVE_TYPE_CONVERSIONS variable."

Generated at Thu Feb 08 10:24:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.