AMBARI-8082. 1.6.0 -> 1.7.0 upgrade with mysql shows exceptions. (swagle)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e2d4f2f3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e2d4f2f3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e2d4f2f3 Branch: refs/heads/trunk Commit: e2d4f2f390b7db0693a1a48c69b4b27601f8e685 Parents: 8795685 Author: Siddharth Wagle <[email protected]> Authored: Fri Oct 31 14:13:38 2014 -0700 Committer: Siddharth Wagle <[email protected]> Committed: Fri Oct 31 14:13:38 2014 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/ambari/server/orm/DBAccessorImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e2d4f2f3/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java index d4d16fe..543e707 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java @@ -350,11 +350,11 @@ public class DBAccessorImpl implements DBAccessor { ); try { - executeQuery(query); + executeQuery(query, ignoreFailure); } catch (SQLException e) { LOG.warn("Add FK constraint failed" + ", constraintName = " + constraintName + - ", tableName = " + tableName, e); + ", tableName = " + tableName, e.getMessage()); if (!ignoreFailure) { throw e; } @@ -532,7 +532,7 @@ public class DBAccessorImpl implements DBAccessor { statement.execute(query); } catch (SQLException e) { if (!ignoreFailure) { - LOG.warn("Error executing query: " + query, e); + LOG.error("Error executing query: " + query, e); throw e; } else { LOG.warn("Error executing query: " + query + ", " +
