I've been working on getting Diesel/MySQL working with TiDB. Do you have any interest in folding in some of the work I've done? I'm doing development on Windows and hit a few snags along the way related to that and others due to TiDB not being 100% compatible.
libmysql 8.0.4-3
Do you have any interest in folding in some of the work I've done?
We're not looking to add any new backends into the main project, but we're certainly happy to do what we can to support you if you'd like to develop it as a third party backend. Or are you asking for changes in the mysql backend to support TiDB?
i’m asking for changes to the MySQL backend and diesel_cli so that it supports both native MySQL and TiDB. I’ve opened issues with TiDB for places where I’m finding incompatible behavior but I think we could tweak Diesel’s MySQL backend in the mean time without negatively affecting native MySQL users.
For example, after I got past the above issues I found that diesel setup was still failing, this time because TiDB doesn’t support DDL in prepared statements. I modified diesel_cli so that it didn’t use prepared statements for create and then finally I could diesel setup without errors. I’d rather not maintain a fork of diesel_cli and since my change should work equally well with MySQL I was hoping you’d accept a pull request for that.
I just wanted to check with you before putting in the work for any pull requests.
For issues like that, a separate backend is likely a better solution. The backend can share a lot of code with the default MySQL backend, but these things tend to drift apart more over time for different reasons, and trying to keep the same connection for both can lead to a lot of issues (we're planning to create a separate mariadb backend for the same reason)
Ok, for now I'll keep track of the changes I need and then when the mariadb backend progresses I can follow suit with a TiDB backend if my experiments turn out the way I want them to.
I found #1882 but it looks like it got stuck somewhere along the way. I'll inquire over there to see if that's still being worked on.
Thanks!
Subscribed this issue!
As pointed out by Siân we are not interested in adding support for TiDB to diesel itself. This could and should be handled by a third party crate maintained by someone that actually uses TiDB. If such a crate exists we are happy to accept a PR for integration within diesel-cli. If there is anything else missing diesel itself which blocks implementing such a third party backend feel free to open a new issue about this.
Most helpful comment
Ok, for now I'll keep track of the changes I need and then when the mariadb backend progresses I can follow suit with a TiDB backend if my experiments turn out the way I want them to.
I found #1882 but it looks like it got stuck somewhere along the way. I'll inquire over there to see if that's still being worked on.
Thanks!