From: <mjd...@us...> - 2009-06-23 19:55:02
|
Revision: 87 http://treebase.svn.sourceforge.net/treebase/?rev=87&view=rev Author: mjdominus Date: 2009-06-23 19:54:51 +0000 (Tue, 23 Jun 2009) Log Message: ----------- add --maxlen option and increase size of dumpable records to default to 5MB Modified Paths: -------------- trunk/treebase-core/src/main/perl/dump/sqldump Modified: trunk/treebase-core/src/main/perl/dump/sqldump =================================================================== --- trunk/treebase-core/src/main/perl/dump/sqldump 2009-06-23 19:46:27 UTC (rev 86) +++ trunk/treebase-core/src/main/perl/dump/sqldump 2009-06-23 19:54:51 UTC (rev 87) @@ -17,6 +17,8 @@ my $test = 0; # test run: delete produced files my $nrecs; # max number of recs per table my $where = ""; # WHERE clause to select dumped records +my $maxlen = 5 * 1024 * 1024; # Maximum field length: 5 MB by default + # get command line options, see Getopt::Long GetOptions( 'name-after-table' => \$name_file_after_table, @@ -28,6 +30,7 @@ 'dsn=s' => \$ENV{'TREEBASE_DB_DSN'}, 'table=s' => \@tables, 'zip' => \$zip, + 'maxlen=i' => \$maxlen, 'test' => \$test, 'nrecs=i' => \$nrecs, 'where=s' => \$where, @@ -68,6 +71,7 @@ { # create database handle my $dbh = get_handle(); + $dbh->{LongReadLen} = $maxlen; # Handle LOBs up to $maxlen bytes for my $table ( @tables ) { # only using these two functions once, so for clarity as to where they This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |