warn.toString(), cont.getXPathContext().getSAXLocator(), warn));
/** * Performs an ANALYSE of a table. * * @param name the name of the table * @param conn a Connection to use * @throws SQLException if something goes wrong */ protected void doAnalyse(String name, Connection conn) throws SQLException { Statement s = conn.createStatement(); s.execute("ANALYSE VERBOSE " + name); SQLWarning e = s.getWarnings(); while (e != null) { LOG.debug("ANALYSE WARNING: " + e.toString()); e = e.getNextWarning(); } }
/** * Performs an ANALYSE of a table. * * @param name the name of the table * @param conn a Connection to use * @throws SQLException if something goes wrong */ protected void doAnalyse(String name, Connection conn) throws SQLException { Statement s = conn.createStatement(); s.execute("ANALYSE VERBOSE " + name); SQLWarning e = s.getWarnings(); while (e != null) { LOG.debug("ANALYSE WARNING: " + e.toString()); e = e.getNextWarning(); } }
/** * Returns the last notice message from PostgreSQL server */ @ReturnNullAsFalse public static String pg_last_notice(Env env, @NotNull Postgres conn) { try { if (conn == null) return null; SQLWarning warning = conn.getWarnings(); if (warning != null) return warning.toString(); else return null; } catch (Exception ex) { log.log(Level.FINE, ex.toString(), ex); return null; } }
_log.warn(warning.toString()); warning = warning.getNextWarning();
_log.warn(warning.toString()); warning = warning.getNextWarning();
private static SQLWarning newWarningCommon( String messageId, Object[] oa ) { String message = MessageService.getCompleteMessage(messageId, oa); String state = StandardException.getSQLStateFromIdentifier(messageId); SQLWarning sqlw = new SQLWarning(message, state, ExceptionSeverity.WARNING_SEVERITY); // GemStone changes BEGIN // log at warning level in GemFire logger // don't log for NO_ROW_FOUND as it is normally not a problem if (!SQLState.LANG_NO_ROW_FOUND.equals(state)) { if (SanityManager.isFineEnabled) { SanityManager.DEBUG_PRINT("warning:SQLWarning", message, sqlw); } else { SanityManager.DEBUG_PRINT("warning:SQLWarning", sqlw.toString()); } } // GemStone changes END return sqlw; } }
private static SQLWarning newWarningCommon( String messageId, Object[] oa ) { String message = MessageService.getCompleteMessage(messageId, oa); String state = StandardException.getSQLStateFromIdentifier(messageId); SQLWarning sqlw = new SQLWarning(message, state, ExceptionSeverity.WARNING_SEVERITY); // GemStone changes BEGIN // log at warning level in GemFire logger // don't log for NO_ROW_FOUND as it is normally not a problem if (!SQLState.LANG_NO_ROW_FOUND.equals(state)) { if (SanityManager.isFineEnabled) { SanityManager.DEBUG_PRINT("warning:SQLWarning", message, sqlw); } else { SanityManager.DEBUG_PRINT("warning:SQLWarning", sqlw.toString()); } } // GemStone changes END return sqlw; } }
private static SQLWarning newWarningCommon( String messageId, Object[] oa ) { String message = MessageService.getCompleteMessage(messageId, oa); String state = StandardException.getSQLStateFromIdentifier(messageId); SQLWarning sqlw = new SQLWarning(message, state, ExceptionSeverity.WARNING_SEVERITY); // GemStone changes BEGIN // log at warning level in GemFire logger // don't log for NO_ROW_FOUND as it is normally not a problem if (!SQLState.LANG_NO_ROW_FOUND.equals(state)) { if (SanityManager.isFineEnabled) { SanityManager.DEBUG_PRINT("warning:SQLWarning", message, sqlw); } else { SanityManager.DEBUG_PRINT("warning:SQLWarning", sqlw.toString()); } } // GemStone changes END return sqlw; } }
warn.toString(), cont.getXPathContext().getSAXLocator(), warn));