Handling patches to contrib modules for different mysql version


I have recently changed servers and come across mysql 5.7 which is not very friendly with some queries from a few different contrib modules. My question is, is it advisable to write patches for these modules addressing these issues and contribute them to the community, or there’s a more standard way of handling such a case? I assume a lot of sites may not have been broken by mysql 5.7 otherwise the code would have been made compliant already.

And in the case of having written patches, what if they’re not accepted? How will i be able to manage that situation of code on my apps that’s not “official”?

Many thanks

Drupal version: 

Source: https://www.drupal.org/taxonomy/term/4/feed