Comments (7)
@vinh3c
I think the event you are looking for is
RowsQueryEvent
See the docs for the repository on how to enable this event for MySQL or MariaDB
4.Optionally you can enable logging SQL queries that precede row based events and listen to RowsQueryEvent.
for MySQL:
binlog_rows_query_log_events = on
for MariaDB:
binlog_annotate_row_events = on
from mysqlcdc.
Hi,
I believe QueryEvent is written in binary log when DDL(alter table) operations are executed.
You can try and see if this event logs necessary information, extract the column information from the sql statement.
from mysqlcdc.
This lib is low level so parsing sql statements seems out of scope for the lib.
Also, unfortunately, currently I don't have time to support such high level abstractions
from mysqlcdc.
![image](https://private-user-images.githubusercontent.com/111959633/289356339-c4201995-33e7-497d-ab09-d5fed58f13d1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1OTM4MTIsIm5iZiI6MTcyMTU5MzUxMiwicGF0aCI6Ii8xMTE5NTk2MzMvMjg5MzU2MzM5LWM0MjAxOTk1LTMzZTctNDk3ZC1hYjA5LWQ1ZmVkNThmMTNkMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyMVQyMDI1MTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05YmFhOTZkZWVlYTAxM2FkOGI0MjBhMGY2NDQyYzMxMmIwMTQ4YTZhYjllNjAwYWQ5Mzg4OTAzZTI2OTMwZmViJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.Eo67y8LN9XJARsz3JI8p62YgUPOYSKDuSVFOSD-ws9Q)
![image](https://private-user-images.githubusercontent.com/111959633/289356305-5c7c3dcf-c023-4eb7-9d52-51026f2ce7d9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1OTM4MTIsIm5iZiI6MTcyMTU5MzUxMiwicGF0aCI6Ii8xMTE5NTk2MzMvMjg5MzU2MzA1LTVjN2MzZGNmLWMwMjMtNGViNy05ZDUyLTUxMDI2ZjJjZTdkOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyMVQyMDI1MTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lOGQyMTM5YzY2OTE3NmNjOGY1Mzk4ZDIxYmFhZmU4MjhlNDAzYTk1ZGM2MGVlMjEwNmQxOTk1YTkzMjk0OTkzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.lVLgKkJMhKccK0Jn5wQkrB23zt42Dc8dF1HddM-xb_U)
I'm trying with that. I work for me
Thanks @rusuly
from mysqlcdc.
Ok, just be informed that QueryEvent and RowsQueryEvent are two different events. The first is used when statement-based replication is enabled. RowsQueryEvent is used when row-based replication is used and it requires some configuration in the config file
from mysqlcdc.
I known that, QueryEvent come after Unknow Event. But i think it better when we have native event for that
Thanks rusuly.
from mysqlcdc.
Thanks @rusuly
from mysqlcdc.
Related Issues (20)
- support for binlog-do-db/binlog-ignore-db HOT 6
- There is a question about missing transactions HOT 13
- How to get the cells column name? HOT 8
- hope to support semi-sync-replication HOT 4
- MaxScale BinLog Server compatibility like maxwell discussion HOT 1
- Empty VARCHAR data column value and JSON data column inner string field value is parsed as null out of MySQL binlog. HOT 12
- Implement v2.0
- no UpdateRowsEvent\DeleteRowsEvent only QueryEvent HOT 2
- Is it possible to get the logs for a specific table? HOT 7
- [Question] TableMapEvent.TableMetaData.ColumnNames returns null HOT 7
- update row event,but ColumnsPresentBeforeUpdate and ColumnsPresentAfterUpdate is same ? HOT 2
- Could not receive a master heartbeat within the specified interval HOT 3
- binlog_row_metadata existence HOT 1
- Add support for USER_VAR_EVENT
- TableMetadata.ColumnNames is null HOT 2
- can't find TableId from INFORMATION_SCHEMA.TABLES. HOT 2
- Parsing negative TIME values is not supported
- Implement SSL strategies HOT 3
- use Production Environment HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mysqlcdc.