Changeset 24110
- Timestamp:
- May 7, 2009, 11:27:13 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/DataStoreServer/scripts/dsreg (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataStoreServer/scripts/dsreg
r23902 r24110 102 102 } 103 103 if (($linkfiles or $copyfiles) and !$datapath and !$abspath) { 104 $err .= "need to specify datapath with --link or--copy\n";105 } 106 if ( $linkfiles && (substr($datapath, 0, 1) ne "/")) {104 $err .= "need to specify datapath or abspath with --link and --copy\n"; 105 } 106 if (!$abspath && $linkfiles && (substr($datapath, 0, 1) ne "/")) { 107 107 $err .= "datapath must begin with / when using --link\n"; 108 108 } … … 144 144 145 145 my $dsn = "DBI:mysql:host=$dbserver;database=$dbname"; 146 my %conn_attrs = (PrintError => 1, RaiseError => 1, AutoCommit => 0); 146 # mysql cookbook says 'PrintError can interfere with failure detection in some cases' 147 my %conn_attrs = (PrintError => 0, RaiseError => 1, AutoCommit => 0); 147 148 148 149 my $dbh = DBI->connect_cached($dsn, $dbuser, $dbpass, \%conn_attrs) … … 211 212 if ($@) { # an error occured 212 213 print STDERR "transaction failed, rolling back error was:\n$@\n"; 214 # roll back within eval to prevent rollback failure from terminating the script 213 215 eval {$dbh->rollback();}; 214 216 cleanup(); … … 476 478 --copy Copy files from datapath to Data Store 477 479 --datapath path to source files for --copy or --link 480 --abspath path to source files is absoloute (--datapath not needed) 478 481 --ps0 - ps7 Optional product specific data 479 482 --rm with --del remove the fileset directory from the Data Store
Note:
See TracChangeset
for help on using the changeset viewer.
