Bug #100391 MySQL Connector/NET 8.0.21 breaks names w/ schemas
Submitted: 30 Jul 2020 23:05 Modified: 27 Oct 2020 21:33
Reporter: William Bosacker Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:8.0.22 OS:Any
Assigned to: CPU Architecture:Any
Tags: BREAKING CHANGE

[30 Jul 2020 23:05] William Bosacker
Description:
*** BREAKING CHANGE ***

Updating to 8.0.21 from 8.0.21 breaks the execution of stored procedures that contain a schema qualified name.

How to repeat:
In 8.0.20 and earlier, you can specify a cmdText of "`fe450admin`.`ISIS_GET_LICENSES`" with the double-quotes as string qualifiers in C#.NET.  In 8.0.21, this causes a failure, and the stored procedure cannot be found.  It looks like the library is adding additional "'" (single quote) characters around the schema name, and the stored procedure name.

Suggested fix:
Remove the additional "'" (single-quote) characters that are being added.
[30 Jul 2020 23:07] William Bosacker
*** BREAKING CHANGE ***

Updating to 8.0.21 from 8.0.20 breaks the execution of stored procedures that contain a schema qualified name.
[31 Jul 2020 4:55] MySQL Verification Team
Hello William Bosacker,

Thank you for the report and feedback.
Imho this looks like duplicate of Bug #100306, please see Bug #100306.

regards,
Umesh
[31 Jul 2020 5:54] William Bosacker
It looks somewhat similar, but is also the complete opposite, and I get a completely different error message.  The error message that I see has the cmdText with doubled up "`" (back-ticks) across the board.  I made a mistake is my report, it's "`" (back-ticks) that are being added in mass, not "'" (single-quote).
[31 Jul 2020 5:59] MySQL Verification Team
Thank you for the feedback.
May I request you to please provide exact test case? i.e create stored procedure and sample c# code to verify the issue at my end? Thank you.

regards,
Umesh
[31 Jul 2020 6:02] William Bosacker
Additionally, I read the change log and one of the changes appears to be the problem.  There is a breaking change that change something like "a.b.c.d.test" to "`a.b.c.d.test`".  That should NEVER be done under any circumstance.  If the developer doesn't put the "`" (back-tick) where needed, then it should fail.  Nothing should auto-insert them.  That's probably why the error message showed every "`" (back-tick) that I typed as being 2 or 3, instead of just the 1.
[27 Oct 2020 21:29] William Bosacker
The latest update to 8.0.22 that is supposed to fix that other issue, hasn't done anything to fix this issue.  This is still broken.
[27 Oct 2020 21:31] William Bosacker
This was never a duplicate.
[27 Oct 2020 21:33] William Bosacker
Here is the current response:

MySql.Data.MySqlClient.MySqlException (0x80004005): Procedure or function 'fe450admin.SPGETGEOUPDATE' cannot be found in database 'local-db-2'. Verify that user '[snip]' has enough privileges to execute.
   at MySql.Data.MySqlClient.ProcedureCache.GetProcData(MySqlConnection connection, String spName)
   at MySql.Data.MySqlClient.ProcedureCache.AddNew(MySqlConnection connection, String spName)
   at MySql.Data.MySqlClient.ProcedureCache.GetProcedure(MySqlConnection conn, String spName, String cacheKey)
   at MySql.Data.MySqlClient.StoredProcedure.GetParameters(String procName)
   at MySql.Data.MySqlClient.StoredProcedure.CheckParameters(String spName)
   at MySql.Data.MySqlClient.StoredProcedure.Resolve(Boolean preparing)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
   at Webroot.Bcap.DataProvider.MySqlReplica.GetGeoUpdateAsync(Int32 versionMajor, Int32 versionMinor) in [snip]\MySqlReplica.cs:line 180
   at Webroot.Bcap.Business.ReadOnlyServicesBF.GetGeoUpdateAsync(Int32 versionMajor, Int32 versionMinor) in [snip]\ReadOnlyServicesBF.cs:line 101