33b95577fc33857345402b4462ce5e094207b24a galt Mon Feb 13 16:09:21 2017 -0800 code cleanup. diff --git src/hg/lib/jksql.c src/hg/lib/jksql.c index 5949e46..6b0428d 100644 --- src/hg/lib/jksql.c +++ src/hg/lib/jksql.c @@ -1673,31 +1673,30 @@ } if (strchr(table,'-')) { return FALSE; // mysql does not allow tables with dash (-) so it will not be found. // hg/lib/hdb.c can generate an invalid table names with dashes while looking for split tables, // if the first chrom name has a dash in it. Examples found were: scaffold_0.1-193456 scaffold_0.1-13376 HERVE_a-int 1-1 // Assembly hubs also may have dashes in chrom names. } // use the table cache if we have one struct sqlConnection *cacheConn = sqlTableCacheFindConn(sc); if (cacheConn) return sqlTableCacheTableExists(cacheConn, table); sqlSafef(query, sizeof(query), "SELECT 1 FROM %-s LIMIT 0", sqlCkIl(table)); -//sqlSafef(query, sizeof(query), "SELECT 1 FROM %-s LIMIT 0", sqlCkId(table)); // DEBUG RESTORE if ((sr = sqlUseOrStore(sc, query, DEFAULTGETTER, FALSE)) == NULL) { if (!sc->failoverConn) return FALSE; // if not found but we have a main connection, check the main connection, too else if ((sr = sqlUseOrStore(sc->failoverConn, query, DEFAULTGETTER, FALSE)) == NULL) return FALSE; } // TODO consider using sqlGetResultExt or something that would // allow you to abort on all errors except the actual table not found: // ERROR 1146 (42S02): Table 'hg19.chr_est' doesn't exist sqlFreeResult(&sr); return TRUE; }