PDA

View Full Version : Support Mysql 5.6.x



krzaczek
December 28th, 2013, 01:32 AM
Hi,

Zrm is not able to backup innodb log files because it does not recoginze that the database supports innodb databases. Since 5.6.1 mysql has removed the 'have_innodb' validable @see mysql bug #63383.

Because of that the code in ZRM/MYSQL.pm

$have_innodb = &extractValue( "have_innodb", $output );
if( defined $have_innodb && $have_innodb eq "ON" )
{ .... } fails

Pawel

vaibhav
December 31st, 2013, 12:46 AM
In latest MySQL version you need to check for the show engines. Please use the following patch above ZRM 3.0 community version.

--- MySQL.pm.in 2013-12-31 15:08:49.455757185 +0530
+++ MySQL.pm.in.updated 2013-12-31 15:08:39.259757300 +0530
@@ -271,7 +271,7 @@
&printWarning( "Binary logging is off.\n" );
}

- $have_innodb = &extractValue( "have_innodb", $output );
+ $have_innodb = &checkIfInnodbEngineExist();
if( defined $have_innodb && $have_innodb eq "YES" ){
my $innodb_data_home_dir = &extractValue( "innodb_data_home_dir", $output );
if( $innodb_data_home_dir && $mysql_server_os eq $MYSQL_WINDOWS ){
@@ -366,6 +366,31 @@
}
}

+# check for the have_innodb flag
+sub checkIfInnodbEngineExist()
+{
+ my $x = &addMySQLParams($MYSQL);
+ $x = "$x -e \"show engines\"";
+ if( $verbose ){
+ &printLog( "Checking for InnoDB engine ".$x."\n" );
+ }
+ $x = &execCmdAndGetOutput($x);
+ if( $x ) {
+ my @t = split( "\n", $x );
+ shift @t;
+ foreach( @t ) {
+ my @name = split( "\t", $_ );
+ if($name[0] =~ /^InnoDB$/ && $name[1] =~/[YES|DEFAULT]/){
+ return "YES";
+ }
+ }
+ }else{
+ &printAndDie( "Could not get mysql engines\n" );
+ }
+ return "NO";
+}
+
+


Thanks
~Vaibhav