Don't commit if not needed
authorJamie Cameron <jcameron@webmin.com>
Sun, 19 Sep 2010 23:01:54 +0000 (16:01 -0700)
committerJamie Cameron <jcameron@webmin.com>
Sun, 19 Sep 2010 23:01:54 +0000 (16:01 -0700)
web-lib-funcs.pl

index 184c538..f84281f 100755 (executable)
@@ -9250,7 +9250,9 @@ sub disconnect_userdb
 my ($str, $h) = @_;
 if ($str =~ /^(mysql|postgresql):/) {
        # DBI disconnnect
-       $h->commit();
+       if (!$h->{'AutoCommit'}) {
+               $h->commit();
+               }
        $h->disconnect();
        }
 elsif ($str =~ /^ldap:/) {