summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dfb273f)
raw | patch | inline | side by side (parent: dfb273f)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 Jan 2008 10:14:33 +0000 (10:14 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 Jan 2008 10:14:33 +0000 (10:14 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8345 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/DBsqlite.pm | patch | blob | history | |
gosa-si/modules/GosaPackages.pm | patch | blob | history |
index 21d7200711fdf77b3a7046b171f4f59c602c6c92..97e843506a327aad737ef004830f89480cfb9714 100644 (file)
}
}
- my $sql_statement = " INSERT INTO $table VALUES ('".join("', '", @add_list)."')";
+ my $sql_statement = "BEGIN TRANSACTION; INSERT INTO $table VALUES ('".join("', '", @add_list)."'); COMMIT;";
my $db_res = $obj->{dbh}->do($sql_statement);
if( $db_res != 1 ) {
return 1;
$update_statement .= join(', ', @update_list);
}
- my $sql_statement = "UPDATE $table SET $update_statement $where_statement";
+ my $sql_statement = "BEGIN TRANSACTION; UPDATE $table SET $update_statement $where_statement; COMMIT;";
my $db_answer = $obj->{dbh}->do($sql_statement);
return $db_answer;
}
$where_statement = "WHERE ".join(' AND ', @del_list);
}
- my $sql_statement = "DELETE FROM $table $where_statement";
+ my $sql_statement = "BEGIN TRANSACTION; DELETE FROM $table $where_statement; COMMIT;";
my $db_res = $obj->{dbh}->do($sql_statement);
return $db_res;
index b53919b5d93554f1884876cc28c148c6546e332d..278752c50ff229fdce385f31ff905ebd9753d93d 100644 (file)
if ($out_msg =~ /<jobdb_id>(\d*?)<\/jobdb_id>/) {
my $job_id = $1;
- my $sql = "UPDATE '$main::job_queue_table_name' SET status='done', result='$out_msg' WHERE id='$job_id'";
+ my $sql = "BEGIN TRANSATION; UPDATE '$main::job_queue_table_name' SET status='done', result='$out_msg' WHERE id='$job_id'; COMMIT;";
my $res = $main::job_db->exec_statement($sql);
return;