|
From: <hib...@li...> - 2006-08-04 13:29:41
|
Author: ste...@jb...
Date: 2006-08-04 09:29:24 -0400 (Fri, 04 Aug 2006)
New Revision: 10213
Modified:
trunk/Hibernate3/src/org/hibernate/tool/hbm2ddl/SchemaExport.java
Log:
clear warnings after logging them
Modified: trunk/Hibernate3/src/org/hibernate/tool/hbm2ddl/SchemaExport.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/tool/hbm2ddl/SchemaExport.java 2006-08-04 13:00:30 UTC (rev 10212)
+++ trunk/Hibernate3/src/org/hibernate/tool/hbm2ddl/SchemaExport.java 2006-08-04 13:29:24 UTC (rev 10213)
@@ -306,10 +306,16 @@
}
if ( export ) {
statement.executeUpdate( sql );
- SQLWarning warnings = statement.getWarnings();
- if ( warnings != null) {
- JDBCExceptionReporter.logWarnings( warnings );
+ try {
+ SQLWarning warnings = statement.getWarnings();
+ if ( warnings != null) {
+ JDBCExceptionReporter.logWarnings( warnings );
+ connectionHelper.getConnection().clearWarnings();
+ }
}
+ catch( SQLException sqle ) {
+ log.warn( "unable to log SQLWarnings : " + sqle );
+ }
}
|