dc56c85d424c91e5c9fa4a8c3ae12881cccdd278
galt
  Fri Oct 7 18:49:19 2022 -0700
sqlSafef v2 shift sqlSanity call to just where needed.

diff --git src/hg/lib/tablesTables.c src/hg/lib/tablesTables.c
index 16f16ac..cdc39d3 100644
--- src/hg/lib/tablesTables.c
+++ src/hg/lib/tablesTables.c
@@ -826,31 +826,32 @@
 /* Construct select, from and where clauses in query, keeping an additional copy of where 
  * Returns the SQL query and the SQL where expression as two dyStrings (need to be freed)  */
 {
 struct dyString *query = dyStringNew(0);
 struct dyString *where = dyStringNew(0);
 struct slName *field, *fieldList = commaSepToSlNames(fields);
 boolean gotWhere = FALSE;
 sqlCkIl(fieldsSafe,fields)
 sqlCkIl(fromSafe,from)
 
 // from can be a list of tables if joining
 sqlDyStringPrintf(query, "select %-s from %-s", fieldsSafe, fromSafe);
 if (!isEmpty(initialWhere))
     {
     sqlDyStringPrintf(where, " where ");
-    sqlSanityCheckWhere(initialWhere, where);
+    sqlDyStringPrintf(where, "%-s", initialWhere); // GALT DEBUG TEST REMOVE
+    //sqlSanityCheckWhere(initialWhere, where);  // GALT DEBUG TEST RESTORE
     gotWhere = TRUE;
     }
 
 /* If we're doing filters, have to loop through the row of filter controls */
 if (withFilters)
     {
     for (field = fieldList; field != NULL; field = field->next)
         {
 	char varName[128];
 	safef(varName, sizeof(varName), "%s_f_%s", varPrefix, field->name);
 	char *val = trimSpaces(cartUsualString(cart, varName, ""));
 	if (!isEmpty(val))
 	    {
 	    if (gotWhere)
 		sqlDyStringPrintf(where, " and ");