Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAdditional issues with `r2d2-diesel` and MySQL #728
Comments
This comment has been minimized.
|
I suspect we need to move diesel/diesel/src/mysql/connection/raw.rs Lines 98 to 102 in 2d6f6b7 diesel/diesel/src/mysql/connection/raw.rs Line 82 in 2d6f6b7 |
This comment has been minimized.
|
@sgrif, I think this just has to do with not consuming/flushing the query result. If I change
to
it works fine. I don't know if this is the most efficient way to do a health check. MySQL has a ping mechanism, but I don't know all the considerations around it, and it wouldn't work for a generic Or maybe there is just some way to flush/drop the row/value without using it? |
This comment has been minimized.
Ameobea
commented
Apr 8, 2017
|
I'm getting this same issue; unable to perform any queries using r2d2-diesel and MySQL. Is there a fix on the radar for this? I've tried to look into a solution on my own but I'm very unfamiliar with diesel and databases in general. |
kardeiz commentedFeb 17, 2017
•
edited
Thanks for PR 727 and the new release (
0.11.1)! Your speed and willingness to help is amazing!Unfortunately, I'm encountering further issues when using r2d2 with MySQL. Whenever I try to run a query, like:
I get
When I get a connection directly using
MysqlConnection::establish, everything works fine.I dug around a little bit, and it is definitely related to the query in the
is_validhealth check. I put together an alternate impl for::r2d2::ManageConnectionwhereis_validalways returnedOk(()), and it worked fine. (Of course, that is not a viable solution for the managed connection.)