diff options
author | unknown <jonas@perch.ndb.mysql.com> | 2006-01-12 11:30:17 +0100 |
---|---|---|
committer | unknown <jonas@perch.ndb.mysql.com> | 2006-01-12 11:30:17 +0100 |
commit | a5ac8675b5a34834e76e05a7b37e5a707bd58f5e (patch) | |
tree | 35bdc371d44e8d7261616f54c870ab7cf71fbe22 /ndb | |
parent | 9c446eadbe923e3837368e69894d142e7c45bed7 (diff) | |
download | mariadb-git-a5ac8675b5a34834e76e05a7b37e5a707bd58f5e.tar.gz |
ndb_dd_ddl - fix bug
BitKeeper/deleted/.del-ndb_error_reporter~48c84ad377571240:
Delete: ndb/tools/ndb_error_reporter
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Release file from hash
Diffstat (limited to 'ndb')
-rwxr-xr-x | ndb/tools/ndb_error_reporter | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/ndb/tools/ndb_error_reporter b/ndb/tools/ndb_error_reporter deleted file mode 100755 index 2b5aadb6171..00000000000 --- a/ndb/tools/ndb_error_reporter +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/perl -w - -use strict; - -if(@ARGV < 1) -{ - print STDERR "Usage:\n"; - print STDERR "\tndb_error_reporter config.ini [username] [--fs]\n\n"; - print STDERR "\tusername is a user that you can use to ssh into\n"; - print STDERR "\t all of your nodes with.\n\n"; - print STDERR "\t--fs means include the filesystems in the report\n"; - print STDERR "\t WARNING: This may require a lot of disk space.\n"; - print STDERR "\t Only use this option when asked to.\n\n"; - exit(1); -} - -my $config_file= $ARGV[0]; -my $config_get_fs= 0; -my $config_username= ''; -if(defined($ARGV[1])) -{ - $config_get_fs= 1 if $ARGV[1] eq '--fs'; - $config_username= $ARGV[1].'@' if $ARGV[1] ne '--fs'; - $config_get_fs= (defined $ARGV[2] && $ARGV[2] eq '--fs')?1:$config_get_fs; -} - -if(!stat($config_file)) -{ - print STDERR "Cannot open configuration file.\n\n"; - exit(1); -} - -my @nodes= split ' ',`ndb_config --config-file=$ARGV[0] --nodes --query=id --type=ndbd`; - -push @nodes, split ' ',`ndb_config --config-file=$ARGV[0] --nodes --query=id --type=ndb_mgmd`; - -sub config { - my $nodeid= shift; - my $query= shift; - my $res= `ndb_config --config-file=$ARGV[0] --id=$nodeid --query=$query`; - chomp $res; - $res; -} - -my @t= localtime(); -my $reportdir= sprintf('ndb_error_report_%u%02u%02u%02u%02u%02u', - ($t[5]+1900),($t[4]+1),$t[3],$t[2],$t[1],$t[0]); - -if(stat($reportdir) || stat($reportdir.'tar.bz2')) -{ - print STDERR "It looks like another ndb_error_report process is running.\n"; - print STDERR "If that is not the case, remove the ndb_error_report directory"; - print STDERR " and run ndb_error_report again.\n\n"; - exit(1); -} - -mkdir($reportdir); - -foreach my $node (@nodes) -{ - print "\n\n Copying data from node $node". - (($config_get_fs)?" with filesystem":""). - "\n\n"; - my $recurse= ($config_get_fs)?'-r ':''; - system 'scp '.$recurse.$config_username.config($node,'host'). - ':'.config($node,'datadir')."/ndb_".$node."* ". - "$reportdir/\n"; -} - -print "\n\n Copying configuration file...\n\n\t$config_file\n\n"; -system "cp $config_file $reportdir/"; - -my $r = system 'bzip2 2>&1 > /dev/null < /dev/null'; -my $outfile; -if($r==0) -{ - $outfile= "$reportdir.tar.bz2"; - system "tar c $reportdir|bzip2 > $outfile"; -} -else -{ - $outfile= "$reportdir.tar.gz"; - system "tar c $reportdir|gzip > $outfile"; -} - -system "rm -rf $reportdir"; - -print "\n\nPlease attach $outfile to your error report\n\n"; |