Bug #115439 Abnormal results when call procedure with the param value is null
Submitted: 27 Jun 2024 3:27 Modified: 11 Aug 2024 11:17
Reporter: ken lau Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:8.0.32-8.4 OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[27 Jun 2024 3:27] ken lau
Description:
I have upgrade my application reference mysql connector version from 6.10.9 to 8.0.32. after this update, I found 'NULL' or "NULL"(is a varchar string, not (null) keyword) error data in the default null column. 
By monitoring the script, I find the @null in call procedure sql statement.
Example:
  call sp_xxxx (1, @NULL, @NULL);
I rollback  mysql connector to old version and get the script:
  call sp_xxxx (1, NULL, NULL);
Normally, this does not cause a data error, @NULL will get (null) in query table. 
but when mysql cluster server has resource shortage, after change instance.
@NULL will random write varchar string 'NULL' or '"NULL"' to table default null column, end the old connection session and create new connection session a can be correct.

https://github.com/mysql/mysql-connector-net/commit/91d3321e0a40d9c48e1a8203eb7774c7a311c3...

How to repeat:
unable to repeat stably

Suggested fix:
rollback the  mysql-connector-net change of paramValue is dbnull logical in MySql.Data.MySqlClient.MySqlParameter.Serialize method 

https://github.com/mysql/mysql-connector-net/commit/91d3321e0a40d9c48e1a8203eb7774c7a311c3...
[11 Jul 2024 11:17] MySQL Verification Team
Hello Ken lau,

Thank you for the bug report.
Could you please provide repeatable test case (sample project etc. - please make it as private if you prefer) to reproduce this issue at our end? Thank you.

Regards,
Ashwini Patil
[12 Aug 2024 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".