diff --git a/modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm b/modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm index ffd56b3f6c5016b736d01f44a60209c2d4b0fbb8..67c5a61ebb35c0d08ab3ee521bd2e63dcb2208b2 100644 --- a/modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm +++ b/modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm @@ -124,8 +124,8 @@ sub CreateNewJob { -prev_job_id => $prev_job_id, -analysis_id => $analysis_id, -input_id => $input_id, - -param_id_stack => $param_id_stack, - -accu_id_stack => $accu_id_stack, + -param_id_stack => $param_id_stack || '', + -accu_id_stack => $accu_id_stack || '', -status => $job_status, -semaphore_count => $semaphore_count, -semaphored_job_id => $semaphored_job_id, diff --git a/modules/Bio/EnsEMBL/Hive/DBSQL/BaseAdaptor.pm b/modules/Bio/EnsEMBL/Hive/DBSQL/BaseAdaptor.pm index 7dbe09ee01d932ac6b90912f4720bb4427fb602e..1fa5ee4b2236354840b2f40abf601450fa07c386 100644 --- a/modules/Bio/EnsEMBL/Hive/DBSQL/BaseAdaptor.pm +++ b/modules/Bio/EnsEMBL/Hive/DBSQL/BaseAdaptor.pm @@ -175,21 +175,19 @@ sub _table_info_loader { my $sth = $dbh->column_info(undef, undef, $table_name, '%'); $sth->execute(); while (my $row = $sth->fetchrow_hashref()) { - my ($position, $name, $type, $is_ai) = @$row{'ORDINAL_POSITION','COLUMN_NAME', 'TYPE_NAME', 'mysql_is_auto_increment'}; + my ($position, $column_name, $column_type, $is_ai) = @$row{'ORDINAL_POSITION','COLUMN_NAME', 'TYPE_NAME', 'mysql_is_auto_increment'}; - $column_set{$name} = 1; - $name2type{$name} = $type; - if($is_ai) { - $autoinc_id = $name; + $column_set{$column_name} = 1; + $name2type{$column_name} = $column_type; + + if( $is_ai # careful! This is only supported by DBD::mysql and will not work with other drivers + or ($column_name eq $table_name.'_id') + or ($table_name eq 'analysis_base' and $column_name eq 'analysis_id') ) { # a special case (historical) + $autoinc_id = $column_name; # careful! This is only supported by DBD::mysql and will not work with other drivers } } $sth->finish; - if( ($driver ne 'mysql') - and scalar(@primary_key)==1 and (uc($name2type{$primary_key[0]}) eq 'INTEGER') ) { - $autoinc_id = $primary_key[0]; - } - $self->column_set( \%column_set ); $self->primary_key( \@primary_key ); $self->autoinc_id( $autoinc_id ); diff --git a/modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm b/modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm index fa5844360cd50fedaa7b5b29313efe25fc239b93..1995f76d2c299ae551f9352e1e9220e434346b0d 100644 --- a/modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm +++ b/modules/Bio/EnsEMBL/Hive/PipeConfig/HiveGeneric_conf.pm @@ -595,6 +595,17 @@ sub run { -batch_size => $batch_size, -hive_capacity => $hive_capacity, -status => $blocked ? 'BLOCKED' : 'EMPTY', # be careful, as this "soft" way of blocking may be accidentally unblocked by deep sync + -total_job_count => 0, + -semaphored_job_count => 0, + -ready_job_count => 0, + -done_job_count => 0, + -failed_job_count => 0, + -num_running_workers => 0, + -num_required_workers => 0, + -behaviour => 'STATIC', + -input_capacity => 4, + -output_capacity => 4, + -sync_lock => 0, ); $analysis_stats_adaptor->store($stats); }