mysql_close fails with Can't call method "disconnect" on an undefined value
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
High
|
Sergei Glushchenko | ||
2.1 |
Fix Released
|
High
|
Sergei Glushchenko |
Bug Description
innobackupex --user=root --slave-info --socket=
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:
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/
On 2.1.3 error line is:
Can't call method "disconnect" on an undefined value at /usr/bin/
perl-version-
perl-Time-
perl-Compress-
perl-YAML-
perl-Mail-
perl-MIME-
perl-HTML-
perl-Log-
perl-Net-
perl-libs-
perl-Module-
perl-5.
perl-DBD-
perl-Params-
perl-URI-
perl-IO-
perl-Compress-
perl-Date-
perl-MailTools-
perl-Algorithm-
perl-Email-
rrdtool-
perl-XML-
perl-Proc-
perl-MIME-
perl-Log-
perl-HTML-
perl-libwww-
perl-XML-
perl-Net-
perl-IO-
perl-Pod-
perl-Pod-
perl-DBI-
perl-TermReadKe
perl-IO-
perl-TimeDate-
perl-Net-
perl-Mail-
perl-Proc-
perl-Log-
perl-XML-
Related branches
- Alexey Kopytov (community): Approve
-
Diff: 514 lines (+421/-3)2 files modifiedinnobackupex (+240/-3)
test/t/kill_long_selects.sh (+181/-0)
Confirmed, we don't pass an argument to mysql_close() in this code:
if( $option_ ibbackup_ binary eq "autodetect" ){
%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( );
# Try to connect MySQL and get the version
....
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.