Skip to content
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

update row event,but ColumnsPresentBeforeUpdate and ColumnsPresentAfterUpdate is same ? #21

Closed
kesshei opened this issue Jul 26, 2021 · 2 comments

Comments

@kesshei
Copy link

kesshei commented Jul 26, 2021

1 rows were updated
{
"TableId": 271,
"Flags": 1,
"ColumnsNumber": 3,
"ColumnsPresentBeforeUpdate": [
true,
true,
true
],
"ColumnsPresentAfterUpdate": [
true,
true,
true
],
"Rows": [
{
"BeforeUpdate": {
"Cells": [
2,
"data1",
18
]
},
"AfterUpdate": {
"Cells": [
2,
"data1",
19
]
}
}
],
"Header": {
"Timestamp": 1627033235,
"EventType": "MYSQL_UPDATE_ROWS_EVENT_V2",
"ServerId": 1,
"EventLength": 78,
"NextEventPosition": 12237,
"EventFlags": 0
}
}

@rusuly
Copy link
Owner

rusuly commented Jul 26, 2021

Hi, I don't think it's the same.
Before update you have the following data [2,"data1", 18] and after update you have [2,"data1", 19]

@rusuly
Copy link
Owner

rusuly commented Jul 26, 2021

You can also control this behavior by tuning the binlog_row_image attribute in the config file.

binlog_row_image=full logs all columns which is default

binlog_row_image=minimal logs only changed columns

@rusuly rusuly closed this as completed Jul 28, 2021
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

No branches or pull requests

2 participants