Bug #112089 libmysqlclient21 8.0.34 introduces new warning output breaking applications
Submitted: 16 Aug 2023 16:16 Modified: 16 Aug 2023 17:42
Reporter: Nathan Neulinger Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S2 (Serious)
Version:8.0.34 OS:Any
Assigned to: CPU Architecture:Any

[16 Aug 2023 16:16] Nathan Neulinger
Description:
The 8.0.34 libmysqlclient packages (ubuntu downstream) introduce this warning:

WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.

While that is being triggered by client/application/perl-module code - it is very inappropriate for a minor version update to introduce new output - this is breaking countless applications that are written against this library.

See: 

https://stackoverflow.com/questions/76875569/warning-mysql-opt-reconnect-is-deprecated-and...

https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/2031548

https://github.com/perl5-dbi/DBD-mysql/issues/354#issuecomment-1680892525

How to repeat:
Run any perl script connecting to MySQL using DBD::mysql on any system that has applied the 8.0.34 security update. 

Suggested fix:
Remove this warning, you're causing more impact by breaking applications NOW instead of benefitting developers by warning them about future impact.
[16 Aug 2023 17:07] MySQL Verification Team
Hi Mr. Neulinger,

Thank you for your bug report.

However, you are not reporting any bug here.

You are just complaining about the deprecation of the function.

That means that you can still use this feature, until it is deprecated. 

It is not deprecated in 8.0, nor is it deprecated in 8.1.

It remains to be seen whether it will be deprecated in 8.2 , 8.3 or some future version. 

The reason for deprecation is very valid. There are  a number of problems that are created during the running of the transaction, when the connection breaks. There are many reports on those problems .......

Not a bug.
[16 Aug 2023 17:12] Jan Willamowius
The deprecation is fine, but the added output on STDERR breaks a number of applications on top.

Thats not OK.

You can't just assume, that a message on STDERR won't break anything. Thats especially untrue in web environments.
[16 Aug 2023 17:13] Nathan Neulinger
Yes, I am. The bug report IS NOT about the deprecation.

The bug is that you've _IN A MINOR VERSION UPDATE_ caused the library to start producing additional OUTPUT to stdout/stderr. THAT is what I'm objecting to, NOT the deprecation itself (which is perfectly reasonable).

The additional output - where there has NEVER been any output previously, IS A BUG, and has broken MANY applications. Any application for example that is generating json now is spewing that warning message where it didn't previously, corrupting the output.

Any web application using perl and mysql client libraries is now getting a warning message dumped into the html output on the page and will continue to do so until OTHER applications/libraries/modules are also updated and deployed.
[16 Aug 2023 17:42] Philip Olson
This is a real problem, and I think this bug should make it to the developer team / product managers for review. It has a real impact on the community unlike other deprecations in the past. 

I personally stopped running scripts because of this as there's no real workaround aside from reverting to 8.0.33.

Why is setting it to false (actively disabling the feature) punished with this error? It should instead be celebrated. Setting it to true (enabling) is a different story. Please review.
[17 Aug 2023 6:53] Bo Lincoln
This bug generates 20000 log entries per minute in our systems and have forced us to downgrade to an old - and potentially less secure - version of the lib. Please remove this printout.
[17 Aug 2023 12:31] MySQL Verification Team
This is now a verified bug report.