[MDEV-14302] JSON is Unknown while replicating Created: 2017-11-07  Updated: 2017-11-11  Resolved: 2017-11-11

Status: Closed
Project: MariaDB Server
Component/s: Data types
Affects Version/s: 10.2.7, 10.2.8, 10.2.9
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Muhammedali KV Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: datatype, replication


 Description   

While replicating JSON from MySQL to mariaDB, it says cannot convert the datatype.
err:
Column 0 of table 'test.json_test' cannot be converted from type '<unknown type>' to type 'longtext'

While writing to relay log, JSON has to be remapped as long text (because we have JSON an alias for longtext) until we have full fledged JSON datatype.

Thanks,
ALI



 Comments   
Comment by Elena Stepanova [ 2017-11-11 ]

The subject has now been explicitly clarified in MariaDB documentation:

The JSON type in MySQL stores the JSON object in a compact form, not as LONGTEXT as in MariaDB. This means that row based replication will not work for JSON types from MySQL to MariaDB.

There are a a few different ways to solve this:

Use statement based replication.
Change the JSON column to type TEXT in MySQL

Generated at Thu Feb 08 08:12:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.