02af9dedd3443875fc2b3eee09c48a5e6f85b1c3 chmalee Wed Nov 6 15:27:22 2024 -0800 Start of work on optional subdir and hubName metadata for hubtools uploads diff --git src/hg/lib/hubSpace.c src/hg/lib/hubSpace.c index de82458..cef18fb 100644 --- src/hg/lib/hubSpace.c +++ src/hg/lib/hubSpace.c @@ -47,30 +47,32 @@ slReverse(&list); sqlFreeResult(&sr); return list; } void hubSpaceSaveToDb(struct sqlConnection *conn, struct hubSpace *el, char *tableName, int updateSize) /* Save hubSpace as a row to the table specified by tableName. * As blob fields may be arbitrary size updateSize specifies the approx size * of a string that would contain the entire query. Arrays of native types are * converted to comma separated strings and loaded as such, User defined types are * inserted as NULL. This function automatically escapes quoted strings for mysql. */ { struct dyString *update = dyStringNew(updateSize); sqlDyStringPrintf(update, "insert into %s values ( '%s','%s',%lld,'%s',NULL,'%s','%s','%s','%s','%s')", tableName, el->userName, el->fileName, el->fileSize, el->fileType, el->lastModified, el->hubNameList, el->db, el->location, el->md5sum); +fprintf(stderr, "hubSpace row insert:\n\n%s\n\n", update->string); +fflush(stderr); sqlUpdate(conn, update->string); dyStringFree(&update); } struct hubSpace *hubSpaceLoad(char **row) /* Load a hubSpace from row fetched with select * from hubSpace * from database. Dispose of this with hubSpaceFree(). */ { struct hubSpace *ret; AllocVar(ret); ret->userName = cloneString(row[0]); ret->fileName = cloneString(row[1]); ret->fileSize = sqlLongLong(row[2]); ret->fileType = cloneString(row[3]);