From do-not-reply at jboss.org Wed Jan 12 10:19:35 2011 Content-Type: multipart/mixed; boundary="===============7823660324672086081==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: exo-jcr-commits at lists.jboss.org Subject: [exo-jcr-commits] exo-jcr SVN: r3793 - jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner. Date: Wed, 12 Jan 2011 10:19:35 -0500 Message-ID: <201101121519.p0CFJZJ9014702@svn01.web.mwc.hst.phx2.redhat.com> --===============7823660324672086081== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/exop= latform/services/jcr/impl/util/jdbc/cleaner/DBCleanerService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatfor= m/services/jcr/impl/util/jdbc/cleaner/DBCleanerService.java 2011-01-12 13:5= 4:37 UTC (rev 3792) +++ jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatfor= m/services/jcr/impl/util/jdbc/cleaner/DBCleanerService.java 2011-01-12 15:1= 9:34 UTC (rev 3793) @@ -188,10 +188,6 @@ { dbCleaner =3D new HSQLSingleDBCleaner(wsEntry, conn); } - else if (dbDialect =3D=3D DBConstants.DB_DIALECT_MYSQL || dbDiale= ct =3D=3D DBConstants.DB_DIALECT_MYSQL_UTF8) - { - dbCleaner =3D new MySQLSingleDBCleaner(wsEntry, conn); - } else { dbCleaner =3D new SingleDBCleaner(wsEntry, conn); Deleted: jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exopl= atform/services/jcr/impl/util/jdbc/cleaner/MySQLSingleDBCleaner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatfor= m/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/exoplatfor= m/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. - */ -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 Anatoliy Bazko - * @version $Id: MySQLSingleDBCleaner.java 3655 2010-12-10 08:25:41Z tolus= ha $ - */ -public class MySQLSingleDBCleaner extends SingleDBCleaner -{ - - /** - * MySQLSingleDBCleaner constructor. - */ - public MySQLSingleDBCleaner(WorkspaceEntry wsEntry, Connection connecti= on) - { - super(wsEntry, connection, true); - } - - /** - * {@inheritDoc} - */ - @Override - protected List getDBCleanScripts() - { - List scripts =3D new ArrayList(commonSingleDBCleanSc= ripts); - scripts.add("delete from JCR_SITEM where I_CLASS=3D2 and CONTAINER_N= AME=3D'" + containerName + "'"); - - return scripts; - } -} --===============7823660324672086081==--