]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/write_mysql
removed debug message
[biopieces.git] / bp_bin / write_mysql
index 1a783bf7396022fb41445a5c057327f660d7ddf3..2d0a2142f83ea0cc15f7efa38fe94f4d6f7a4280 100755 (executable)
@@ -39,8 +39,8 @@ use Maasha::Calc;
 
 my ( $options, $user, $password, $dbh, $in, $out, $tmp_dir, $tmp_file, $fh_out, $record, $key, $type_hash, $i, @keys, $line );
 
-$user     = $ENV{ "USER" };
-$password = $ENV{ "USER" };
+$user     = Maasha::Biopieces::biopiecesrc( "MYSQL_USER" );
+$password = Maasha::Biopieces::biopiecesrc( "MYSQL_PASSWORD" );
 
 $options = Maasha::Biopieces::parse_options(
     [
@@ -122,6 +122,10 @@ if ( Maasha::SQL::table_exists( $dbh, $options->{ 'table' } ) )
         create_table( $dbh, $options->{ 'table' }, $type_hash, $options->{ 'index' }, $options->{ 'verbose' } );
     }
 }
+else
+{
+    create_table( $dbh, $options->{ 'table' }, $type_hash, $options->{ 'index' }, $options->{ 'verbose' } );
+}
 
 Maasha::SQL::bulk_load_file( $dbh, $tmp_file, $options->{ 'table' }, "\t" ) if Maasha::SQL::table_exists( $dbh, $options->{ 'table' } );