5b8c4168d4807c729fc8b1f199d9eb03c9411069 galt Thu Mar 3 18:40:54 2016 -0800 Replacing simple literal NOSQLINJ in string with the #define NOSQLINJ. This is slightly better because the compiler can catch a mis-spelling of the NOSQLINJ keyword. This was suggested by Angie. diff --git src/hg/hgc/pubs.c src/hg/hgc/pubs.c index da23476..7cedef5 100644 --- src/hg/hgc/pubs.c +++ src/hg/hgc/pubs.c @@ -290,31 +290,31 @@ char *nameListString = slNameListToString(names, ','); slNameFree(names); return nameListString; } static struct sqlResult *queryMarkerRows(struct sqlConnection *conn, char *markerTable, \ char *articleTable, char *item, int itemLimit, char *sectionList, char *artExtIdFilter) /* query marker rows from mysql, based on http parameters * optionally filter on sections or just a single article * */ { char query[4000]; /* Mysql specific setting to make the group_concat function return longer strings */ -//sqlUpdate(conn, "NOSQLINJ SET SESSION group_concat_max_len = 100000"); +//sqlUpdate(conn, NOSQLINJ "SET SESSION group_concat_max_len = 100000"); char artFilterSql[4000]; artFilterSql[0] = 0; if (isNotEmpty(artExtIdFilter)) safef(artFilterSql, sizeof(artFilterSql), " AND extId='%s' ", artExtIdFilter); // no need to check for illegal characters in sectionList sqlSafef(query, sizeof(query), "SELECT distinct %s.articleId, url, title, authors, citation, year, " "pmid FROM %s " //"group_concat(snippet, concat(\" (section: \", section, \")\") SEPARATOR ' (...) ') FROM %s " "JOIN %s USING (articleId) " "WHERE markerId='%s' AND section in (%-s) " "%-s" //"GROUP by articleId " "ORDER BY year DESC "