Skip to content

Cannot get binlog info from MariaDB 10.2.x when string length greater than 252 #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mia0x75 opened this issue Dec 11, 2017 · 12 comments · Fixed by #786
Closed

Cannot get binlog info from MariaDB 10.2.x when string length greater than 252 #204

mia0x75 opened this issue Dec 11, 2017 · 12 comments · Fixed by #786

Comments

@mia0x75
Copy link

mia0x75 commented Dec 11, 2017

MariaDB 10.2.11 w/ CentOS 7.4, go-canal latest git version

table schema:

CREATE TABLE `dt_text` (
  `c` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

when string value length less than or equals 252, everything is ok

insert into dt_text values (repeat('1', 252));

and when length greater than 252, go-canal does not print any information.

insert into dt_text values (repeat('1', 252));
insert into dt_text values (repeat('1', 253));
insert into dt_text values (repeat('1', 65535));
@siddontang
Copy link
Collaborator

@mia0x75

Can you show me the output information? does go-canal panic?

@mia0x75
Copy link
Author

mia0x75 commented Dec 11, 2017

Hi @siddontang,

go-canal is still running, and it prints nothing, it just missing this binlog info.

@siddontang
Copy link
Collaborator

How about

insert into dt_text values (repeat('1', 252));
insert into dt_text values (repeat('1', 253));
insert into dt_text values (repeat('1', 65535));
insert into dt_text values (repeat('1', 252));

it just missing this binlog info

What is the mean here?

@mia0x75
Copy link
Author

mia0x75 commented Dec 11, 2017

I cannot see any output on go-canal, looks like go-canal miss this change, not sure how go-canal works.

@siddontang
Copy link
Collaborator

can you show me the canel output? I am confused what do you say.

@mia0x75
Copy link
Author

mia0x75 commented Dec 11, 2017

screen dump attached, thx. The following sample shows 124 characters, not sure if the issue is relevant to charset.

screenshot from 2017-12-11 20-00-53-min

@siddontang
Copy link
Collaborator

seem this is not the canal output, do you add the info log by yourself?

@mia0x75
Copy link
Author

mia0x75 commented Dec 11, 2017

no, just git clone and compile.

@siddontang
Copy link
Collaborator

Do you try insert into dt_text values (repeat('1', 252)); again?

@mia0x75
Copy link
Author

mia0x75 commented Dec 11, 2017

it's the same, you can easy to install mariadb to verify.

@mia0x75
Copy link
Author

mia0x75 commented Dec 12, 2017

Finally, I find the root cause, the issue is caused by the new system variables introduced in MariaDB 10.2

log_bin_compress & log_bin_compress_min_len

Thus, go-canal cannot process compressed bin log.

@siddontang
Copy link
Collaborator

got it @mia0x75

We have not supported the compression yet. You can help us add this if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants