update autocommit patch for v3.8pre
---- warewulf-common-3.7/lib/Warewulf/DataStore/SQL/MySQL.pm 2017-02-22 09:32:01.000000000 -0800
-+++ warewulf-common-3.7.patch/lib/Warewulf/DataStore/SQL/MySQL.pm 2017-02-22 13:47:35.000000000 -0800
-@@ -111,6 +111,9 @@
- my $db_user = $config->get("database user");
- my $db_pass = $config->get("database password");
+--- a/lib/Warewulf/DataStore/SQL/MySQL.pm 2017-09-06 14:18:10.000000000 -0700
++++ b/lib/Warewulf/DataStore/SQL/MySQL.pm 2017-10-09 08:17:50.000000000 -0700
+@@ -245,13 +245,16 @@
+ my $dbh;
+ my $conn_str = "DBI:mysql:database=$db_name";
+ # Use the DB's transaction handling
+ my %attr = ( AutoCommit => 1, );
+
- if ($config_root->get("database user")) {
- $db_user = $config_root->get("database user");
- $db_pass = $config_root->get("database password");
-@@ -121,7 +124,7 @@
- &dprint("DATABASE SERVER: $db_server\n");
- &dprint("DATABASE USER: $db_user\n");
-
-- if ($self->{"DBH"} = DBI->connect_cached("DBI:mysql:database=$db_name;host=$db_server", $db_user, $db_pass)) {
-+ if ($self->{"DBH"} = DBI->connect_cached("DBI:mysql:database=$db_name;host=$db_server", $db_user, $db_pass, \%attr)) {
- &iprint("Successfully connected to database!\n");
- $self->{"DBH"}->{"mysql_auto_reconnect"} = 1;
- } else {
+ if ( $db_server ) {
+ $conn_str .= ";host=$db_server";
+ if ( $db_port && $db_port > 0 ) {
+ $conn_str .= ";port=$db_port";
+ }
+ }
+- $dbh = DBI->connect_cached($conn_str, $db_user, $db_pass);
++ $dbh = DBI->connect_cached($conn_str, $db_user, $db_pass, \%attr);
+ if ( $dbh ) {
+ $dbh->{'mysql_auto_reconnect'} = 1;
+ }
