Repository: blackbeam/mysql_async (language: rust)

Issue:
Version 0.28.1 authentication issues
Hi all,

mysql_async `0.27.1` works well with Mariadb. Upgrading to `0.28.1` causes authentication issues.

[Sample program to recreate the issue ](https://github.com/bfjnaude/mysql-async-mariadb-issue/blob/main/src/main.rs)

Running the example program using mysql_async 0.27.1 produces:

`Connected to database with version 10.3.23-MariaDB-log`

Running the example program using mysql_async 0.28.1 produces:

`thread 'main' panicked at 'Could not connect to db: Server(ServerError { code: 1045, message: "Access denied for user 'zulzi-user'@'10.240.0.29' (using password: YES)", state: "28000" })', src/main.rs:16:47`

*Note*: a connection URL with the format `mysql://user@db-host:password@db-host.some_domain/db_name` was used.

The same connection string works on `0.27.1`






Discussion / hints:
Hi. The connection URL given isn't valid because reserved characters are not encoded (according to the RFC 1738).
Have you tried to give a valid URL? (It seem to be `mysql://user%40db-host:password@db-host.some_domain/db_name`)
Yes, I have tried replacing the @ with %40, but still get the same result when building with 0.28.1. 
Works fine with 0.27.1 though.

The fact that the error from the server returns `'zulzi-user'@'10.240.0.29'` as the user that is being denied access, leads me to believe that the URL crate is handling that part properly.

We run MariaDB in Azure. I was trying to reproduce this locally and couldn't seem to get the same behaviour. I did some digging and found this [Microsoft article](https://techcommunity.microsoft.com/t5/azure-database-for-mysql-blog/why-is-username-servername-required-to-connect-to-azure-database/ba-p/1204525). It seems like they rely on the driver being able to handle @ in the username portion of the URL.

When using the same connection URL with `sqlx` in another project, I also get a successful connection. 

Fix patch:
diff --git a/src/conn/mod.rs b/src/conn/mod.rs
index 87b99a88..3b828862 100644
--- a/src/conn/mod.rs
+++ b/src/conn/mod.rs
@@ -513,6 +513,7 @@ impl Conn {
     ) -> Result<()> {
         if !self.inner.auth_switched {
             self.inner.auth_switched = true;
+            self.inner.nonce = auth_switch_request.plugin_data().to_vec();
 
             if matches!(
                 auth_switch_request.auth_plugin(),


Test patch: