trellix-enterprise / mysql-audit

AUDIT Plugin for MySQL. See wiki and readme for description. If you find the plugin useful, please star us on GitHub. We love stars and it's a great way to show your feedback.
Other
239 stars 57 forks source link

offset-extract.sh failed for MySQL >= 8.0.32 #266

Open yoku0825 opened 1 year ago

yoku0825 commented 1 year ago

$ bash offset-extract/offset-extract.sh /usr/mysql/8.0.35/bin/mysqld
//offsets for: /usr/mysql/8.0.35/bin/mysqld (8.0.35)
{"8.0.35","80e986a85d7d128ef07b8229193e98e6", 9496, 9536, 4952, 6436, 1288, 0, 0, 32, 64, 160, 1376, 9636, 6056, 4248, 4256, 4260, 7720, 1576, 32, 8680, 8720, 8704, 12880, 140, 664offsets.gdb:33: Error in sourced command file:
No symbol "TABLE_LIST" in current context.,```

`offset-extract.sh` expects the `TABLE_LIST` 

https://github.com/trellix-enterprise/mysql-audit/blob/466c36d6050b01ac33a7519d68d235a3dfd93cc9/offset-extract/offset-extract.sh#L134-L142

But MySQL 8.0.32 and later are refactored it to `Table_ref` ..

https://github.com/mysql/mysql-server/commit/951cb5106cb8677c08afa683fd5aa747488c1ccd
yoku0825 commented 1 year ago

I wrote the patch for this, but not yet verify the result is correct or not.

https://github.com/trellix-enterprise/mysql-audit/compare/master...yoku0825:mysql-audit:idea_for_266

yoku0825 commented 5 months ago

My colleagues succeeded to build / use under our 8.0.35 environment.

yoku0825 commented 5 months ago

https://github.com/trellix-enterprise/mysql-audit/pull/273

yoku0825 commented 5 months ago

https://github.com/trellix-enterprise/mysql-audit/pull/274 instead of #273