diff --git a/NEWS b/NEWS index 6b82c426..5ab9262a 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,37 @@ +20120422 + +* A race condition bug caused restructuring of a central piece of the + code. Thus this release of GNU Parallel should be considered beta + quality. + +* sql --dbsize will now list sizes of all databases if given no + database. + +* Article: Computational and experimental analyses of + retrotransposon-associated minisatellite DNAs in the soybean genome. + http://www.biomedcentral.com/content/supplementary/1471-2105-13-s2-s13-s1.pdf + +* Blog post: GNU parallel - the best thing since sliced bread. + https://arrayal.wordpress.com/2012/03/27/gnu-parallel-the-best-thing-since-sliced-bread/ + +* Blog post: GNU Parallel makes everything faster. + http://compbiously.blogspot.com/2012/03/gnu-parallel-makes-everything-faster.html + +* Blog post (German): Howto: GNU parallel. + http://d24m.de/2012/04/05/howto-gnu-parallel/ + +* Blog post: Running in Parallel + http://interactivity.ifactory.com/2012/04/running-in-parallel/ + +* 20000 watched the first intro video. + http://pi.dk/1 + +* The first 5 have received their GNU Parallel merchandise + https://www.gnu.org/software/parallel/merchandise.html + +* Bug fixes and man page updates. + + 20120322 * Parallel Process Database Dumps. diff --git a/doc/release_new_version b/doc/release_new_version index 7d6587cd..48403954 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -171,16 +171,20 @@ cc:Sandro Cazzaniga , Ryoichiro Suzuki , Jesse Alama -Subject: GNU Parallel 20120422 ('') released +Subject: GNU Parallel 20120422 ('Mærsk') released -GNU Parallel 20120422 ('') has been released. It is +GNU Parallel 20120422 ('Mærsk') has been released. It is available for download at: http://ftp.gnu.org/gnu/parallel/ -This is a bugfix release with no new features. Probably a good release -for stable long-term use. - New in this release: +* A race condition bug caused restructuring of a central piece of the + code. Thus this release of GNU Parallel should be considered beta + quality. + +* sql --dbsize will now list sizes of all databases if given no + database. + * Article: Computational and experimental analyses of retrotransposon-associated minisatellite DNAs in the soybean genome. http://www.biomedcentral.com/content/supplementary/1471-2105-13-s2-s13-s1.pdf @@ -197,6 +201,12 @@ New in this release: * Blog post: Running in Parallel http://interactivity.ifactory.com/2012/04/running-in-parallel/ +* 20000 watched the first intro video. + http://pi.dk/1 + +* The first 5 have received their GNU Parallel merchandise + https://www.gnu.org/software/parallel/merchandise.html + * Bug fixes and man page updates. diff --git a/src/parallel.pod b/src/parallel.pod index 3373ef9a..7f88fab8 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -1334,9 +1334,9 @@ Use B<-v> B<-v> to print the wrapping ssh command when running remotely. Print the version GNU B and exit. -=item B<--workdir> I (beta testing) +=item B<--workdir> I -=item B<--wd> I (beta testing) +=item B<--wd> I Files transferred using B<--transfer> and B<--return> will be relative to I on remote computers, and the command will be executed in diff --git a/src/sql b/src/sql index 54e794d7..812b2106 100755 --- a/src/sql +++ b/src/sql @@ -815,22 +815,45 @@ sub dblist { sub dbsize { my $dbdriver = shift; my %dburl = @_; - my %statement = - ("mysql" => ( - 'SELECT '. - ' table_schema "Data Base Name", '. - ' SUM(data_length+index_length)/1024/1024 "Data Base Size in MB" '. - 'FROM information_schema.TABLES '. - 'GROUP BY table_schema;'), - "postgresql" => ( - "SELECT ". - " pg_database_size('".$dburl{'database'}."') AS bytes,". - " pg_size_pretty(pg_database_size('".$dburl{'database'}."')) AS human_readable;"), - "sqlite" => ( - "SELECT ".(undef_as_zero(-s $dburl{'database'}))." AS bytes;"), - "sqlite3" => ( - "SELECT ".(undef_as_zero(-s $dburl{'database'}))." AS bytes;"), - ); + my %statement; + if(defined $dburl{'database'}) { + %statement = + ("mysql" => ( + 'SELECT '. + ' table_schema "database", '. + ' SUM(data_length+index_length) "bytes", '. + ' SUM(data_length+index_length)/1024/1024 "megabytes" '. + 'FROM information_schema.TABLES '. + "WHERE table_schema = '$dburl{'database'}'". + 'GROUP BY table_schema;'), + "postgresql" => ( + "SELECT '$dburl{'database'}' AS database, ". + "pg_database_size('$dburl{'database'}') AS bytes, ". + "pg_size_pretty(pg_database_size('$dburl{'database'}')) AS human_readabable "), + "sqlite" => ( + "SELECT ".(undef_as_zero(-s $dburl{'database'}))." AS bytes;"), + "sqlite3" => ( + "SELECT ".(undef_as_zero(-s $dburl{'database'}))." AS bytes;"), + ); + } else { + %statement = + ("mysql" => ( + 'SELECT '. + ' table_schema "database", '. + ' SUM(data_length+index_length) "bytes", '. + ' SUM(data_length+index_length)/1024/1024 "megabytes" '. + 'FROM information_schema.TABLES '. + 'GROUP BY table_schema;'), + "postgresql" => ( + 'SELECT datname AS database, pg_database_size(datname) AS bytes, '. + 'pg_size_pretty(pg_database_size(datname)) AS human_readabable '. + 'FROM (SELECT datname FROM pg_database) a;'), + "sqlite" => ( + "SELECT 0 AS bytes;"), + "sqlite3" => ( + "SELECT 0 AS bytes;"), + ); + } if($statement{$dbdriver}) { return $statement{$dbdriver}; } else { @@ -840,7 +863,7 @@ sub dbsize { } -# Return the code for 'show database size' in the chosen database dialect +# Return the code for 'show table size' in the chosen database dialect sub tablesize { my $dbdriver = shift; my $database = shift; @@ -1070,5 +1093,4 @@ sub debug { print @_; } -# TODO --list-databases: psql -l eller '\l'. mysql show databases. Oracle ? $::opt_skip_first_line = $::opt_shebang = 0;