src/hg/encode/encodeValidate/doEncodeValidate.pl 1.154
1.154 2009/02/13 23:46:02 mikep
test for table name too long
Index: src/hg/encode/encodeValidate/doEncodeValidate.pl
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/encodeValidate/doEncodeValidate.pl,v
retrieving revision 1.153
retrieving revision 1.154
diff -b -B -U 4 -r1.153 -r1.154
--- src/hg/encode/encodeValidate/doEncodeValidate.pl 13 Feb 2009 21:59:49 -0000 1.153
+++ src/hg/encode/encodeValidate/doEncodeValidate.pl 13 Feb 2009 23:46:02 -0000 1.154
@@ -1651,8 +1651,10 @@
# mysql doesn't allow hyphens in table names and our naming convention doesn't allow underbars; to be
# safe, we strip non-alphanumerics.
$tableName =~ s/[^A-Za-z0-9]//g;
+ die "Table name [$tableName] too long, must be <= 64 chars, got [".length($tableName)."]\n" if length($tableName) > 64;
+
if(!$opt_allowReloads) {
if($db->quickQuery("select count(*) from trackDb where tableName = ?", $tableName)) {
die "view '$view' has already been loaded as track '$tableName'\nPlease contact your wrangler if you need to reload this data\n";
}