-
Bug
-
Resolution: Done
-
Undefined
-
None
-
rhel-9.7
-
None
-
None
-
Low
-
rhel-stacks-services-scripting
-
None
-
False
-
False
-
-
None
-
None
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
-
x86_64
-
None
What were you trying to do that didn't work?
Running perl script that connects to MySQL
What is the impact of this issue to you?
The deprecated warning breaks the automation
Please provide the package NVR for which the bug is seen:
4.053-1.el9.x86_64
How reproducible is this bug?:
100%
Steps to reproduce
- Create a mysql script that connects Mysql:
#!/usr/bin/perl
use DBI;
$VARDB_port='3306';
$VARDB_database='mysql';
$VARDB_server='localhost';
$VARDB_user='XXXXXXXX';
$VARDB_pass='YYYYYYYY';
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
or die "Couldn't connect to database: " . DBI->errstr;
$stmtA = "show global variables like 'log_error'";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
while (@row=$sthA->fetchrow_array())
$sthA->finish();
$dbhA->disconnect();
print "$log_error \n";
exit;
- Run this script with perl-DBD-MySQL
Expected results
Run without showing deprecated warning "MYSQL_OPT_RECONNECT"
Actual results
The actual issue is that the deprecated warning "MYSQL_OPT_RECONNECT is deprecated" appears when using the latest version of perl-DBD-MySQL (4.053-1.el9.x86_64) in Perl scripts connecting to a MySQL database. This warning is absent when using the older version (4.050-13.el9.x86_64) of the package. The warning is not present in the default MySQL configuration or system logs, indicating it originates from the specific script's usage of "MYSQL_OPT_RECONNECT".
- duplicates
-
RHEL-113048 pmda-mysql reports deprecation warning
-
- Integration
-