Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-131915

Perl-DBD-MySQL-4.053-1.el9.x86_64 shows deprecation warning MYSQL_OPT_RECONNECT

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • rhel-9.7
    • perl-DBD-MySQL
    • None
    • None
    • Low
    • rhel-stacks-services-scripting
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • 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

      1. 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())
         

      {     $log_error      = ($row[1]);     }

      $sthA->finish();
      $dbhA->disconnect();

      print "$log_error \n";

      exit;

      1.  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".

              mspacek@redhat.com Michal Josef Spacek
              rhn-support-plawate Pranav Lawate
              perl-maint-list perl-maint-list
              Martin Kyral Martin Kyral
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: