xtrabackup does not work: perl version string contains invalid data

Bug #646647 reported by Andreas
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Fix Released
Undecided
Alexey Kopytov

Bug Description

I am using xtrabackup for mysql.
Version 1.3, under Windows.
It does not work, however.

This command:
innobackupex-1.5.1.pl --user=root --password=mypw --database=mydb c:\temp
or (just without Dir):
innobackupex-1.5.1.pl --user=root --password=mypw --database=mydb

produces this error:
Version string '' contains invalid data; ignoring: '' at innobackupex-1.5.1.pl line 1636.

This single character between the single quotes which it complains about looks like a spade from playing cards.
There is no such character in the perl-script, of course.
Is there a solution?

Thank you
Andreas

Related branches

Revision history for this message
Andreas (andidriehaus) wrote :

Hello
it is Version 1.2 under Windows, not 1.3.
Sorry for that.

Revision history for this message
Ben Sebborn (ben-skiddle) wrote :

Same experience here on Freebsd 8.1 (AMD64)

We're running Perl 5.12.2

Will a fix be published for this fairly soon, or do we need to downgrade Perl?

Ben

Revision history for this message
Ben Sebborn (ben-skiddle) wrote :

If it helps, I have changed line 1636 of this file:

 #$perl_version = chr($required_perl_version[0])
        # . chr($required_perl_version[1])
        # . chr($required_perl_version[2]);
       #

        $perl_version = "v$required_perl_version[0].$required_perl_version[1].$required_perl_version[2]";

This now works

Revision history for this message
Andreas (andidriehaus) wrote : Aw: [Bug 646647] Re: xtrabackup does not work: version string contains invalid data

 Hi,
you mean you just commented it out?

Sincerely
Andreas

----- Original Nachricht ----
Von: Ben Sebborn <email address hidden>
An: <email address hidden>
Datum: 16.11.2010 20:10
Betreff: [Bug 646647] Re: xtrabackup does not work: version string contains
 invalid data

> If it helps, I have changed line 1636 of this file:
>
> #$perl_version = chr($required_perl_version[0])
> # . chr($required_perl_version[1])
> # . chr($required_perl_version[2]);
> #
>
> $perl_version =
> "v$required_perl_version[0].$required_perl_version[1].$required_perl_version
> [2]";
>
>
> This now works
>
> --
> xtrabackup does not work: version string contains invalid data
> https://bugs.launchpad.net/bugs/646647
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Open source backup tool for InnoDB and XtraDB: New
>
> Bug description:
> I am using xtrabackup for mysql.
> Version 1.3, under Windows.
> It does not work, however.
>
> This command:
> innobackupex-1.5.1.pl --user=root --password=mypw --database=mydb c:\temp
> or (just without Dir):
> innobackupex-1.5.1.pl --user=root --password=mypw --database=mydb
>
> produces this error:
> Version string '?' contains invalid data; ignoring: '?' at
> innobackupex-1.5.1.pl line 1636.
>
> This single character between the single quotes which it complains about
> looks like a spade from playing cards.
> There is no such character in the perl-script, of course.
> Is there a solution?
>
> Thank you
> Andreas
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/percona-xtrabackup/+bug/646647/+subscribe
>

Revision history for this message
LinuxLars (lwilson-casadelnorte) wrote : Re: xtrabackup does not work: version string contains invalid data

I've tested this on the following, all with the same error:

XtraBackup 1.5.1 on Ubuntu Server 10.10 with MySQL 5.5.6-rc ,
Ubuntu Desktop 10.10 with MySQL 5.5.6-rc,
and MacOSX 10.6 with MySQL 5.1 and 5.5.6-rc

Revision history for this message
Daniël van Eeden (dveeden) wrote :

In version 1.4-193.lucid.25 of xtrabackup the error is on line 1708 of innobackupex-1.5.1

This line is from revision 7 from vadim@p according to a bzr annotate innobackupex-1.5.1.

In rev 79 kinoyas changed something about the $perl_version var which is used on line which generates the error.

The error is in ghe check_args subroutine and happens when innobackupex-1.5.1 is called w/o arguments.

Her is the output from bzr ann:

                | # check the version of the perl we are running
                | if (!defined $^V) {
                | # this perl is prior to 5.6.0 and uses old style version string
                | my $required_version = $required_perl_version_old_style;
                | if ($] lt $required_version) {
22 kinoyas | print STDERR "$prefix Warning: " .
7 vadim@p | "Your perl is too old! Innobackup requires\n";
22 kinoyas | print STDERR "$prefix Warning: perl $required_version or newer!\n";
7 vadim@p | }
                | } else {
79 kinoyas | $perl_version = chr($required_perl_version[0])
                | . chr($required_perl_version[1])
                | . chr($required_perl_version[2]);
7 vadim@p | if ($^V lt $perl_version) {
                | my $version = chr(48 + $required_perl_version[0])
                | . "." . chr(48 + $required_perl_version[1])
                | . "." . chr(48 + $required_perl_version[2]);
22 kinoyas | print STDERR "$prefix Warning: " .
7 vadim@p | "Your perl is too old! Innobackup requires\n";
22 kinoyas | print STDERR "$prefix Warning: perl $version or newer!\n";
7 vadim@p | }
                | }

summary: - xtrabackup does not work: version string contains invalid data
+ xtrabackup does not work: perl version string contains invalid data
Revision history for this message
Daniël van Eeden (dveeden) wrote :

The comment says that the new $^V is used on anything newer that 5.6.0, which doesn't seem to be true.

The $perl_version which is compared with $^V doesn't contain dots or a leading v and shouldn't be compared as if it were a number.

---------------------------------------------------------
$ perl --version

This is perl, v5.8.8 built for i486-linux-gnu-thread-multi

Copyright 1987-2006, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

$ perl -e 'print $^V . "\n"';

$
---------------------------------------------------------

---------------------------------------------------------
$ perl --version

This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi

Copyright 1987-2009, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

$ perl -e 'print $^V . "\n"';
v5.10.1
$
---------------------------------------------------------

Revision history for this message
Daniël van Eeden (dveeden) wrote :

It is fixed in MySQL Enterprise Backup:
http://bugs.mysql.com/bug.php?id=53769

Revision history for this message
Srand (cyril-scetbon) wrote :

Here is a patch that work for me with perl 5.10.1 :

--- /usr/bin/innobackupex-1.5.1 2010-11-17 18:14:20.000000000 +0100
+++ /var/tmp/innobackupex-1.5.1 2010-12-21 10:25:24.000000000 +0100
@@ -1705,7 +1705,7 @@
         $perl_version = chr($required_perl_version[0])
             . chr($required_perl_version[1])
             . chr($required_perl_version[2]);
- if ($^V lt $perl_version) {
+ if ($^V lt "v$required_perl_version_old_style") {
             my $version = chr(48 + $required_perl_version[0])
                 . "." . chr(48 + $required_perl_version[1])
                 . "." . chr(48 + $required_perl_version[2]);

Revision history for this message
Baron Schwartz (baron-xaprb) wrote : Re: [Bug 646647] Re: xtrabackup does not work: perl version string contains invalid data

I think the code in the second "if" branch should just be deleted. It
is obvious by looking at it that it's useless. It is hard to imagine
what kind of programmer would have ever written that code. The fix in
the official MySQL Enterprise Backup is to simply comment out that
code.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

The code in question was removed from innobackupex (see the linked branch/MP). Changing the status to Fix Committed.

Changed in percona-xtrabackup:
status: New → Fix Committed
assignee: nobody → Alexey Kopytov (akopytov)
Revision history for this message
Alexey Kopytov (akopytov) wrote :

The fix has been released in XtraBackup 1.6

Changed in percona-xtrabackup:
milestone: none → 1.6
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-1098

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.