mysql_close fails with Can't call method "disconnect" on an undefined value

Reported by markus_albe on 2013-07-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup
High
Sergei Glushchenko
2.1
High
Sergei Glushchenko

Bug Description

 innobackupex --user=root --slave-info --socket=/var/lib/mysql/mysql.sock06 --parallel=4 -safe-slave-backup --apply-log --use-memory=4G /data/m06/backup

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Ireland Ltd 2009-2012. All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

130708 16:47:42 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;mysql_socket=/var/lib/mysql/mysql.sock06' as 'root' (using password: NO).
130708 16:47:42 innobackupex: Connected to MySQL server
Connected successfully

On 2.1.1 error line is:
Can't call method "disconnect" on an undefined value at /usr/bin/innobackupex line 1477.

On 2.1.3 error line is:
Can't call method "disconnect" on an undefined value at /usr/bin/innobackupex line 1482.

perl-version-0.77-119.el6_1.1.x86_64
perl-Time-HiRes-1.9721-119.el6_1.1.x86_64
perl-Compress-Raw-Zlib-2.023-119.el6_1.1.x86_64
perl-YAML-Syck-1.07-4.el6.x86_64
perl-Mail-Sendmail-0.79-12.el6.noarch
perl-MIME-Lite-3.027-2.el6.noarch
perl-HTML-Parser-3.64-2.el6.x86_64
perl-Log-Log4perl-1.30-1.el6.noarch
perl-Net-SSLeay-1.35-9.el6.x86_64
perl-libs-5.10.1-119.el6_1.1.x86_64
perl-Module-Pluggable-3.90-119.el6_1.1.x86_64
perl-5.10.1-119.el6_1.1.x86_64
perl-DBD-MySQL-4.013-3.el6.x86_64
perl-Params-Validate-0.92-3.el6.x86_64
perl-URI-1.40-2.el6.noarch
perl-IO-Compress-Base-2.020-119.el6_1.1.x86_64
perl-Compress-Zlib-2.020-119.el6_1.1.x86_64
perl-Date-Manip-6.24-1.el6.noarch
perl-MailTools-2.04-4.el6.noarch
perl-Algorithm-Diff-1.1902-9.el6.noarch
perl-Email-Date-Format-1.002-5.el6.noarch
rrdtool-perl-1.3.8-6.el6.x86_64
perl-XML-RegExp-0.03-7.el6.noarch
perl-Proc-ProcessTable-0.44-4.el6.x86_64
perl-MIME-Types-1.28-2.el6.noarch
perl-Log-Dispatch-2.27-1.el6.noarch
perl-HTML-Tagset-3.20-4.el6.noarch
perl-libwww-perl-5.833-2.el6.noarch
perl-XML-DOM-1.44-7.el6.noarch
perl-Net-LibIDN-0.12-3.el6.x86_64
perl-IO-Socket-SSL-1.31-2.el6.noarch
perl-Pod-Escapes-1.04-119.el6_1.1.x86_64
perl-Pod-Simple-3.13-119.el6_1.1.x86_64
perl-DBI-1.609-4.el6.x86_64
perl-TermReadKey-2.30-13.el6.x86_64
perl-IO-Compress-Zlib-2.020-119.el6_1.1.x86_64
perl-TimeDate-1.16-11.1.el6.noarch
perl-Net-ARP-1.0.6-2.1.el6.x86_64
perl-Mail-Sender-0.8.16-3.el6.noarch
perl-Proc-Daemon-0.06-1.el6.noarch
perl-Log-Dispatch-FileRotate-1.19-4.el6.noarch
perl-XML-Parser-2.36-7.el6.x86_64

Alexey Kopytov (akopytov) wrote :

Confirmed, we don't pass an argument to mysql_close() in this code:

  if( $option_ibbackup_binary eq "autodetect" ){
   # Try to connect MySQL and get the version
                        %mysql = mysql_connect(
                                               abort_on_error => 0,
                                               keepalives => 0
                                              );
                        if ($mysql{dbh}) {
                            print STDERR "Connected successfully\n";
                            $option_ibbackup_binary = set_xtrabackup_version();
                            mysql_close();
....

OTOH that code is only reached if there is no xtrabackup_binary file in the backup directory *and* the xtrabackup binary was not specified explicitly with --ibbackup.

So I would first figure out why xtrabackup_binary was not written to the backup directory (it should be, if the backup was successfully created with innobackupex).

The workaround is to specify the xtrabackup binary explicitly using the --ibbackup option.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers