MySQL Query Cache Invalidation with comment_propagation
Current Behaviour:
When enabling comment_propagation for the mysql2 adapter, we noticed that it invalidates MySQL's query cache. It appears to be potentially linked to a known MySQL issue documented here: MySQL Bug #40986. The specific line in the codebase possibly implicated in this behavior can be found here.
Expected Behaviour:
At the very least, there should be documentation outlining the implications of enabling comment_propagation.
Steps to Reproduce:
Datadog.configure do |c|
c.tracing.instrument :mysql2, comment_propagation: "full"
Environment:
- ddtrace version: 1.20.0
- Ruby version: 3.2.0
Thanks @zmariscal , I will have a look!
From MySQL Bug #40986:
'/* */'-style comments are fine and do not affect caching.
This is possibly a workaround.
Any update on this issue? Anything I can do to help?
From MySQL Bug #40986:
'/* */'-style comments are fine and do not affect caching.This is possibly a workaround.
This is the current implementation. I am forwarding this to our DBM team.
Hi @zmariscal, which version of MySQL are you querying and is it self-hosted, Aurora, etc?
Hi @zmariscal, which version of MySQL are you querying and is it self-hosted, Aurora, etc?
The AWS Engine version is as follows: 5.7.mysql_aurora.2.11.2
Ok, thanks for the report. We've opened a ticket and will get back to you when we know more