mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-29 15:21:53 +00:00
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:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2016 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -35,6 +35,7 @@ import javax.sql.DataSource;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.repo.content.filestore.FileContentWriter;
|
||||
import org.alfresco.repo.domain.hibernate.dialect.AlfrescoMySQLClusterNDBDialect;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.util.LogUtil;
|
||||
import org.alfresco.util.TempFileProvider;
|
||||
@@ -537,6 +538,23 @@ public class ScriptExecutorImpl implements ScriptExecutor
|
||||
sql = sql.replaceAll("(?i)TYPE=InnoDB", "ENGINE=InnoDB");
|
||||
}
|
||||
|
||||
if (this.dialect != null && this.dialect instanceof AlfrescoMySQLClusterNDBDialect)
|
||||
{
|
||||
// note: enable bootstrap on MySQL Cluster NDB
|
||||
/*
|
||||
* WARNING: Experimental/unsupported - see AlfrescoMySQLClusterNDBDialect !
|
||||
*/
|
||||
sql = sql.replaceAll("(?i)TYPE=InnoDB", "ENGINE=NDB"); // belts-and-braces
|
||||
sql = sql.replaceAll("(?i)ENGINE=InnoDB", "ENGINE=NDB");
|
||||
|
||||
sql = sql.replaceAll("(?i) BIT ", " BOOLEAN ");
|
||||
sql = sql.replaceAll("(?i) BIT,", " BOOLEAN,");
|
||||
|
||||
sql = sql.replaceAll("(?i) string_value text", " string_value VARCHAR(1024)");
|
||||
|
||||
sql = sql.replaceAll("(?i) VARCHAR(4000)", "TEXT(4000)");
|
||||
}
|
||||
|
||||
Object fetchedVal = executeStatement(connection, sql, fetchColumnName, optional, line, scriptFile);
|
||||
if (fetchVarName != null && fetchColumnName != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user