Author: tolusha
Date: 2011-01-12 10:19:34 -0500 (Wed, 12 Jan 2011)
New Revision: 3793
Removed:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner/MySQLSingleDBCleaner.java
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner/DBCleanerService.java
Log:
JCR-1570: DB clean on MySQL should not use iterating over all db
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner/DBCleanerService.java
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner/DBCleanerService.java 2011-01-12
13:54:37 UTC (rev 3792)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner/DBCleanerService.java 2011-01-12
15:19:34 UTC (rev 3793)
@@ -188,10 +188,6 @@
{
dbCleaner = new HSQLSingleDBCleaner(wsEntry, conn);
}
- else if (dbDialect == DBConstants.DB_DIALECT_MYSQL || dbDialect ==
DBConstants.DB_DIALECT_MYSQL_UTF8)
- {
- dbCleaner = new MySQLSingleDBCleaner(wsEntry, conn);
- }
else
{
dbCleaner = new SingleDBCleaner(wsEntry, conn);
Deleted:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner/MySQLSingleDBCleaner.java
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner/MySQLSingleDBCleaner.java 2011-01-12
13:54:37 UTC (rev 3792)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner/MySQLSingleDBCleaner.java 2011-01-12
15:19:34 UTC (rev 3793)
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2003-2010 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not,
see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.services.jcr.impl.util.jdbc.cleaner;
-
-import org.exoplatform.services.jcr.config.WorkspaceEntry;
-
-import java.sql.Connection;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author <a href="mailto:anatoliy.bazko@gmail.com">Anatoliy
Bazko</a>
- * @version $Id: MySQLSingleDBCleaner.java 3655 2010-12-10 08:25:41Z tolusha $
- */
-public class MySQLSingleDBCleaner extends SingleDBCleaner
-{
-
- /**
- * MySQLSingleDBCleaner constructor.
- */
- public MySQLSingleDBCleaner(WorkspaceEntry wsEntry, Connection connection)
- {
- super(wsEntry, connection, true);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected List<String> getDBCleanScripts()
- {
- List<String> scripts = new
ArrayList<String>(commonSingleDBCleanScripts);
- scripts.add("delete from JCR_SITEM where I_CLASS=2 and
CONTAINER_NAME='" + containerName + "'");
-
- return scripts;
- }
-}