当前位置:网站首页>Tidb CDC synchronization of features not available in MySQL to MySQL
Tidb CDC synchronization of features not available in MySQL to MySQL
2022-06-11 17:33:00 【On the way to data communication】
One 、 background
In order to ensure tidb Stable operation of , We are tidb The backend of is connected to a mysql, however tidb There are also some mysql Features not found in , At this time of the cdc What will happen , Here are some of the common features to be tested
Two 、 The experimental steps
1. Refresh binary
# Execution location : The downstream mysql
# Purpose : To make it easier to see what is actually written to the binary
flush logs
2. Create a SHARD_ROW_ID_BITS Table of features
create table write_hot_3 (id bigint(20) not null, z_name varchar(20), z_info varchar(30),unique key(id)) SHARD_ROW_ID_BITS = 4
PRE_SPLIT_REGIONS=3
create table write_hot_2(id bigint(20) not null auto_random primary key,z_name varchar(20),z_info varchar(30));
insert into write_hot_2(z_name,z_info) values('abc','def');
3. Observations
3.1 Downstream meter building
show create table write_hot_3;
CREATE TABLE `write_hot_3` (
`id` bigint(20) NOT NULL,
`z_name` varchar(20) DEFAULT NULL,
`z_info` varchar(30) DEFAULT NULL,
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
show create table write_hot_2;
CREATE TABLE `write_hot_2` (
`id` bigint(20) NOT NULL,
`z_name` varchar(20) DEFAULT NULL,
`z_info` varchar(30) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb
select * from write_hot_2;
3.2 Observe the binary condition
mysqlbinlog --base64-output=decode-rows -vv mysql-bin.000003
# It can be found that the contents recorded in the binary system are annotated with specific comments , Explain if there is dm When syncing ,, The downstream tidb Clusters can also be created to contain SHARD_ROW_ID_BITS Table of features
SET @@session.collation_database=DEFAULT/*!*/;
create table write_hot_3 (id bigint(20) not null, z_name varchar(20), z_info varchar(30),unique key(id)) /* 90000 SHARD_ROW_ID_BITS = 4
PRE_SPLIT_REGIONS=3 */
/*!*/;
# at 523
#220527 10:29:16 server id 1 end_log_pos 732 CRC32 0x0564e224 Query thread_id=43 exec_time=0 error_code=0
SET TIMESTAMP=1653618556/*!*/;
create table write_hot_2(id bigint(20) not null /*T![auto_rand] auto_random */ primary key,z_name varchar(20),z_info varchar(30))
/*!*/;
# at 928
#220527 10:34:43 server id 1 end_log_pos 980 CRC32 0x3c2cef4c Write_rows: table id 121 flags: STMT_END_F
### INSERT INTO `test_db`.`write_hot_2`
### SET
### @1=4035225266123964417 /* LONGINT meta=0 nullable=0 is_null=0 */
### @2='abc' /* VARSTRING(80) meta=80 nullable=1 is_null=0 */
### @3='def' /* VARSTRING(120) meta=120 nullable=1 is_null=0 */
3、 ... and 、 Verified properties
Functions that can be synchronized normally and retain features in the binary
- SHARD_ROW_ID_BITS
- auto_random
- auto_random Implicit insertion of
Follow up experiments are continuously updated
边栏推荐
- 端口规划与APJ
- CLP information -5 keywords to see the development trend of the financial industry in 2022
- Custom or subscription? What is the future development trend of China's SaaS industry?
- R语言寻找数据集缺失值位置
- 定制 or 订阅?未来中国 SaaS 行业发展趋势是什么?
- tidb-lightning配置数据还原路由
- 6-2 写文章(*)
- Authing Share|理解 SAML2 协议
- ffmpeg硬编解码 Inter QSV
- Service学习笔记04- 其他服务实现方式与替代方式
猜你喜欢

sql server中关于FORCESCAN的使用以及注意项

拜登下令强制推行零信任架构

Service学习笔记01-启动方式与生命周期

vscode配置eslint自动格式化报错“Auto Fix is enabled by default. Use the single string form“

Custom or subscription? What is the future development trend of China's SaaS industry?

Service学习笔记02-实战 startService 与bindService

Axi protocol Basics

聚类方法汇总

From manufacturing to "intelligent manufacturing", explore the way for manufacturing enterprises to break the situation

Hands on deep learning - multiple input and output channels in the convolution layer
随机推荐
There are so many open source projects. This time, I'll show you the differences between different versions and understand the meaning of alpha version, beta version and RC version
Use exe4j to convert The jar file is packaged as Exe file
Windows technology - how to view the instruction set, model, attribute and other details supported by the CPU, and how to use the CPU-Z tool to view the processor, memory, graphics card, motherboard,
Is it safe for Xiaobai to open an account directly on the flush?
端口规划与APJ
Analyze which should be tested in PMP and ACP with actual cases? Which is more useful?
Talk about the interview questions of the collection
Hands on deep learning - multiple input and output channels in the convolution layer
Authoring share | understanding saml2 protocol
Docker installs mysql5.7 (enable binlog function and modify characters)
What is the minimum change price of PTA futures? How can PTA futures be safe?
Authing Share|理解 SAML2 协议
ffmpeg奇偶场帧Interlace progressive命令和代码处理
mysql 大表的拆分方式
子类继承了什么、多态、 向上转型
Mathematical basis of information security Chapter 1 - Division
Leetcode-- array
7-1 均是素数
How to become an optimist organization?
adb 命令学习笔记