6a6617d61cc3d666b71d3b884e33bda120d07d7d hiram Wed Jul 23 09:24:26 2014 -0700 correctly using sqlDyStringPrintf refs #9741 diff --git src/hg/hgTracks/joinedRmskTrack.c src/hg/hgTracks/joinedRmskTrack.c index 80f6c0b..a1f79ec 100644 --- src/hg/hgTracks/joinedRmskTrack.c +++ src/hg/hgTracks/joinedRmskTrack.c @@ -1040,42 +1040,42 @@ rmskJoinedFree (&ro); } freeHash (&hash); } else { char table[64]; boolean hasBin; struct dyString *query = newDyString (1024); /* * Do black and white on single track. Fetch less than * we need from database. */ if (hFindSplitTable (database, chromName, tg->table, table, &hasBin)) { - dyStringPrintf (query, + sqlDyStringPrintf (query, "select chromStart,blockCount,blockSizes," "blockRelStarts from %s where ", table); if (hasBin) hAddBinToQuery (winStart, winEnd, query); - dyStringPrintf (query, "chromStart<%u and chromEnd>%u ", + sqlDyStringPrintf (query, "chromStart<%u and chromEnd>%u ", winEnd, winStart); /* * if we're using a single rmsk table, add chrom to the where clause */ if (startsWith ("rmskJoined", table)) - dyStringPrintf (query, " and chrom = '%s' ", chromName); + sqlDyStringPrintf (query, " and chrom = '%s' ", chromName); sr = sqlGetResult (conn, query->string); while ((row = sqlNextRow (sr)) != NULL) { int idx = 0; int blockCount = sqlSigned (row[1]); int sizeOne; int *blockSizes; int *blockRelStarts; int chromStart = sqlUnsigned (row[0]); sqlSignedDynamicArray (row[2], &blockSizes, &sizeOne); assert (sizeOne == blockCount); sqlSignedDynamicArray (row[3], &blockRelStarts, &sizeOne); assert (sizeOne == blockCount); for (idx = 1; idx < blockCount - 1; idx++)