Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Queries are not correctly encoded in ruby 1.9 #14

Open
d11wtq opened this issue May 7, 2012 · 1 comment
Open

Queries are not correctly encoded in ruby 1.9 #14

d11wtq opened this issue May 7, 2012 · 1 comment

Comments

@d11wtq
Copy link
Contributor

d11wtq commented May 7, 2012

On models with Binary properties, which #dump the data with force_encoding("BINARY"), the DataObjects adapter doesn't pay attention to the encoding and builds a "UTF-8" encoded string containing non-UTF-8 data. This manifests in an explosion when using the New Relic middleware, which introspects queries.

@d11wtq
Copy link
Contributor Author

d11wtq commented May 7, 2012

Actually, not 100% if this is happening during query execution, or during query logging. It explodes when new relic receives the query as a log entry, which means it's already executed in the DB. I'd have thought with MySQL (which we use), DataObjects adapter would be using prepared statements, but I may be wrong. Haven't got a huge amount of time to look into it right now.

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

No branches or pull requests

1 participant