91600eb3c7b19250ad08878a8286bbda5f63e807
angie
  Wed Oct 29 15:34:50 2014 -0700
At Jorge's request, adding a FLUSH TABLES to the end of the temporarySQL file that creates tableDescriptions, in hopes that this will end
myisamchk errors about the table not being closed properly.

diff --git src/test/buildTableDescriptions.pl src/test/buildTableDescriptions.pl
index faffa41..0766589 100755
--- src/test/buildTableDescriptions.pl
+++ src/test/buildTableDescriptions.pl
@@ -433,23 +433,26 @@
 	print "$db.$table FIELD MISMATCH:\n";
 	print "$db.$table table fields:   $tableFields{$table}\n";
 	print "$db.$table autoSql fields: $as->{fields} [$as->{tableName}]\n";
       }
     } else {
       print "$db.$table: No AutoSql.\n";
     }
     my $anchor = $tableAnchors{$table} || "";
     #*** should suggest addition to gbdD of table&.as if not already in there;
     #*** should complain about gbdD tables not in any active db.
     my $asd = (defined $as) ? $as->{autoSql} : "";
     $asd =~ s/'/\\'/g;
     print SQL "INSERT INTO tableDescriptions (tableName, autoSqlDef, gbdAnchor)"
       . " values ('$table', '$asd', '$anchor');\n";
   }
+  # Thanks Jorge for finding that this fixes a problem with myisamchk complaining
+  # that the file was not closed properly:
+  print SQL "FLUSH TABLES tableDescriptions;\n";
   close(SQL);
   if (! $noLoad) {
     (! system("/cluster/bin/x86_64/hgsql $db < $sqlFile")) || die "hgsql error for $sqlFile";
     print "Loaded $db.tableDescriptions.\n";
     unlink($sqlFile);
   }
 }