diff --git a/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java b/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java index 7aad265..f488231 100644 --- a/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java +++ b/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java @@ -920,8 +920,7 @@ void createCatalog(String catName, String location, String description, boolean DatabaseProduct.determineDatabaseProduct( conn.getMetaData().getDatabaseProductName() ), hiveConf); - String query = sqlGenerator.addForUpdateClause("select max(" + quoteIf("CTLG_ID") + ") " + - "from " + quoteIf("CTLGS")); + String query = "select max(" + quoteIf("CTLG_ID") + ") from " + quoteIf("CTLGS"); LOG.debug("Going to run " + query); ResultSet rs = stmt.executeQuery(query); if (!rs.next()) { @@ -937,7 +936,7 @@ void createCatalog(String catName, String location, String description, boolean conn.commit(); success = true; } - } catch (MetaException|SQLException e) { + } catch (SQLException e) { throw new HiveMetaException("Failed to add catalog", e); } finally { try {