65d4e214bd753220cd3f1b9700f107ef1ae648da chmalee Fri May 24 09:36:42 2024 -0700 Make hubSpace autoSql files, haven't created the table yet diff --git src/hg/lib/jksql.c src/hg/lib/jksql.c index 1adfa8a..83f518d 100644 --- src/hg/lib/jksql.c +++ src/hg/lib/jksql.c @@ -798,31 +798,31 @@ char query[32]; sqlSafef(query, sizeof query, "show databases"); struct sqlResult *sr = sqlGetResult(sc, query); char **row; struct slName *databases = NULL; while ((row = sqlNextRow(sr)) != NULL) { if (!startsWith("mysql", row[0])) /* Avoid internal databases. */ slSafeAddHead(&databases, slNameNew(row[0])); } sqlFreeResult(&sr); return databases; } -static bool sqlTableExistsOnMain(struct sqlConnection *sc, char *tableName) +bool sqlTableExistsOnMain(struct sqlConnection *sc, char *tableName) /* Return TRUE if the table can be queried using sc's main conn; * don't check failoverConn or the table cache (showTableCache in hg.conf). */ { // if the whole db does not exist on the main server, then the table is certainly not there if (sqlConnMustUseFailover(sc)) return FALSE; char query[1024]; sqlCkIl(tableNameSafe,tableName) //char tableNameSafe[strlen(tableName)+9+1]; sqlCheckIdentifiersList(tableNameSafe, sizeof tableNameSafe, tableName); sqlSafef(query, sizeof(query), "SELECT 1 FROM %-s LIMIT 0", tableNameSafe); struct sqlResult *sr; // temporarily remove failover connection, we don't want the failover switch here struct sqlConnection *failoverConn = sc->failoverConn;