Merged 5.0.N (5.0.4) to 5.1.N (5.1.2)

124539 jvonka: Merged 50N-NDB (5.0.4) to 5.0.N (5.0.4)
      124514: MNT-15211: NDB-specific workaround fix for trashcan restore (since NDB does not support partial rollback on constraint violation)
      - this fix is dialect-specific (hence does not impact existing supported DB types)
      - note: MySQL Cluster NDB - experimental/unsupported


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@124582 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Raluca Munteanu
2016-03-30 08:01:49 +00:00
parent 363efe70ae
commit c9f13752c3
7 changed files with 193 additions and 32 deletions

View File

@@ -0,0 +1,54 @@
/*
* Copyright (C) 2005-2016 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.domain.hibernate.dialect;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.dialect.MySQLInnoDBDialect;
/**
* MySQL Cluster NDB specific DAO overrides
*
* WARNING:
* - Experimental only (unsupported) !
* - The NDB storage engine is *not* currently supported or certified !
* - Can be used for dev/test evaluation (please give us feedback)
* - Should not be used for live/prod env with real data !
* - Requires FK support (hence NDB 7.3.x or higher)
*
* @author janv
*
*/
//note: *not* a dialect of InnoDB but, for now, extends here so that we can override those scripts
public class AlfrescoMySQLClusterNDBDialect extends MySQLInnoDBDialect
{
protected Log logger = LogFactory.getLog(AlfrescoMySQLClusterNDBDialect.class);
public AlfrescoMySQLClusterNDBDialect()
{
super();
logger.error("Using NDB with Alfresco is experimental and unsupported (do not use for live/prod envs) !");
}
public String getTableTypeString() {
return " engine=NDB";
}
}