Update of /var/cvs/src/org/mmbase/storage/implementation/database In directory james.mmbase.org:/tmp/cvs-serv20153
Modified Files: Tag: MMBase-1_8 DatabaseStorageManager.java Log Message: MMB-1724 See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/storage/implementation/database See also: http://www.mmbase.org/jira/browse/MMB-1724 Index: DatabaseStorageManager.java =================================================================== RCS file: /var/cvs/src/org/mmbase/storage/implementation/database/DatabaseStorageManager.java,v retrieving revision 1.169.2.12 retrieving revision 1.169.2.13 diff -u -b -r1.169.2.12 -r1.169.2.13 --- DatabaseStorageManager.java 8 Jul 2008 11:07:33 -0000 1.169.2.12 +++ DatabaseStorageManager.java 1 Oct 2008 20:55:35 -0000 1.169.2.13 @@ -32,7 +32,7 @@ * * @author Pierre van Rooden * @since MMBase-1.7 - * @version $Id: DatabaseStorageManager.java,v 1.169.2.12 2008/07/08 11:07:33 pierre Exp $ + * @version $Id: DatabaseStorageManager.java,v 1.169.2.13 2008/10/01 20:55:35 michiel Exp $ */ public class DatabaseStorageManager implements StorageManager { @@ -69,6 +69,8 @@ */ private static boolean legacyWarned = false; + private static boolean verifyTablesWarned = false; + /** * Whether the warning about blobs located on disk was given. */ @@ -165,6 +167,21 @@ } } + /** + * @since MMBase-1.8.7 + */ + protected boolean verifyTables() { + boolean verifyTables = ! "false".equals(factory.getMMBase().getInitParameter("verifyTables")); + if (!verifyTablesWarned) { + if (! verifyTables) { + log.info("Not verifying tables. No implicit synchronization of datatypes to matching db types is done. No warnings about that are logged."); + } else { + log.service("Verifying tables. Implicit synchronization of datatypes to matching db types will be done. Warnings about that are logged."); + } + verifyTablesWarned = true; + } + return verifyTables; + } /** * Obtains an active connection, opening a new one if needed. @@ -1879,7 +1896,7 @@ } String tableName = (String) factory.getStorageIdentifier(builder); createTable(builder, tableFields, tableName); - if (!isVerified(builder)) { + if (verifyTables() && !isVerified(builder)) { verify(builder); } } @@ -2197,7 +2214,7 @@ public boolean exists(MMObjectBuilder builder) throws StorageException { boolean result = exists((String)factory.getStorageIdentifier(builder)); if (result) { - if (!isVerified(builder)) { + if (verifyTables() && !isVerified(builder)) { verify(builder); } } _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs