530ddd87de0141d1738ddb2e95faf9ade76df49a galt Tue Apr 10 09:16:21 2012 -0700 advancing to the next stage in the mysql load correct warnings detection and abort diff --git src/hg/lib/jksql.c src/hg/lib/jksql.c index de2f9f2..b7bd9bf 100644 --- src/hg/lib/jksql.c +++ src/hg/lib/jksql.c @@ -1331,35 +1331,34 @@ sr = sqlGetResult(conn, query); monitorEnter(); info = mysql_info(conn->conn); monitorLeave(); if (info == NULL) errAbort("no info available for result of sql query: %s", query); numScan = sscanf(info, "Records: %d Deleted: %*d Skipped: %d Warnings: %d", &numRecs, &numSkipped, &numWarnings); if (numScan != 3) errAbort("can't parse sql load info: %s", info); sqlFreeResult(&sr); char *host = getenv("HOST"); if ( // TODO 2012/03/26 this is temporary and we should eventually get to always checking the warnings. - ( sameOk(host,"hgwdev") + sameOk(host,"hgwdev") || sameOk(host,"hgwbeta") || sameOk(host,"hgwalpha") - ) - && !sameOk(cfgOption("detectMysqlLoadWarnings"), "off")) // go gently in case of backwards-compatibility issues + || sameOk(cfgOption("detectMysqlLoadWarnings"), "on")) // go gently in case of backwards-compatibility issues { /* mysql 5.0 bug: mysql_info returns unreliable warnings count, so use this instead: */ numWarnings = sqlWarnCount(conn); } if ((numSkipped > 0) || (numWarnings > 0)) { boolean doAbort = TRUE; if ((numSkipped > 0) && (options & SQL_TAB_FILE_WARN_ON_ERROR)) doAbort = FALSE; /* don't abort on errors */ else if ((numWarnings > 0) && (options & (SQL_TAB_FILE_WARN_ON_ERROR|SQL_TAB_FILE_WARN_ON_WARN))) doAbort = FALSE; /* don't abort on warnings */ if (numWarnings > 0) {