1d7247f0e72ce7c7ee1543bb31e6e71b4f2d771d max Fri Dec 9 16:15:13 2016 -0800 trying to fix an error that is thrown only in newer mysql versions. The fields in hubStatus are defined as not being NULL but have NULL as their default value. In addition, in the INSERT statement in hubConnect.c, they are not specified. Newer Mysql versions refuse to set them to NULL if NULL is not allowed. No redmine. This came up on the CIRM server but will come up everywhere in the future. diff --git src/hg/lib/hubConnect.c src/hg/lib/hubConnect.c index 087264b..ff6fa11 100644 --- src/hg/lib/hubConnect.c +++ src/hg/lib/hubConnect.c @@ -394,32 +394,31 @@ dyStringPrintf(dy,"%s,", hel->name); } *pCount = dbCount; return dy->string; } static void insertHubUrlInStatus(char *url) /* add a url to the hubStatus table */ { struct sqlConnection *conn = hConnectCentral(); char query[4096]; char *statusTable = getHubStatusTableName(); if (sqlFieldIndex(conn, statusTable, "firstAdded") >= 0) - sqlSafef(query, sizeof(query), "insert into %s (hubUrl,firstAdded) values (\"%s\",now())", - statusTable, url); + sqlSafef(query, sizeof(query), "insert into %s (hubUrl,shortLabel,longLabel,dbCount,dbList,status,lastOkTime,lastNotOkTime,errorMessage,firstAdded) values (\"%s\",\"\",\"\",0,NULL,0,\"\",\"\",\"\",now())", statusTable, url); else sqlSafef(query, sizeof(query), "insert into %s (hubUrl) values (\"%s\")", statusTable, url); sqlUpdate(conn, query); hDisconnectCentral(&conn); } static unsigned getHubId(char *url, char **errorMessage) /* find id for url in hubStatus table */ { struct sqlConnection *conn = hConnectCentral(); char query[4096]; char **row; boolean foundOne = FALSE; int id = 0;