summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5bdba2c)
raw | patch | inline | side by side (parent: 5bdba2c)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 1 Apr 2009 16:36:50 +0000 (16:36 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 1 Apr 2009 16:36:50 +0000 (16:36 +0000) |
Don't waste resources if statement list is empty.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13576 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13576 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/DBsqlite.pm | patch | blob | history |
index ddb4c0d8490387f04f8872c001f61338f84e12c6..93aa51bab858d173ab9587578b71e19c2d79dc2b 100644 (file)
&main::daemon_log("0 ERROR: GOSA::DBsqlite::lock was called static! Statement was '$self'!", 1);
return;
}
- if(not ref $self->{db_lock_handle}) {
+ if(not ref $self->{db_lock_handle} or not fileno $self->{db_lock_handle}) {
sysopen($self->{db_lock_handle}, $self->{db_lock}, O_RDWR) or &main::daemon_log("0 ERROR: Opening the database ".$self->{db_name}." failed with $!", 1);
}
my $lock_result = flock($self->{db_lock_handle}, LOCK_EX);
&main::daemon_log("0 ERROR: GOSA::DBsqlite::exec_statementlist was called static!", 1);
return;
}
+
+ return undef if (ref($sql_list) ne 'ARRAY' or @{ $sql_list } == 0);
+
my @db_answer;
foreach my $sql_statement (@$sql_list) {