Author: nzamosenchuk
Date: 2011-07-29 10:37:45 -0400 (Fri, 29 Jul 2011)
New Revision: 4688
Modified:
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/jcr-mjdbc.mysql.sql
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/jcr-sjdbc.mysql.sql
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/writing/TestAddNode.java
Log:
EXOJCR-1341 : fixed in way mysql-utf8 dialect does. Table columns in database that must be
case-sensitive are created with right collation.
Modified:
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/jcr-mjdbc.mysql.sql
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/jcr-mjdbc.mysql.sql 2011-07-28
13:07:41 UTC (rev 4687)
+++
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/jcr-mjdbc.mysql.sql 2011-07-29
14:37:45 UTC (rev 4688)
@@ -5,7 +5,7 @@
CREATE TABLE JCR_MITEM(
ID VARCHAR(96) NOT NULL,
PARENT_ID VARCHAR(96) NOT NULL,
- NAME VARCHAR(512) NOT NULL,
+ NAME VARCHAR(512) CHARSET latin1 COLLATE latin1_general_cs NOT NULL,
VERSION INTEGER NOT NULL,
I_CLASS INTEGER NOT NULL,
I_INDEX INTEGER NOT NULL,
Modified:
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/jcr-sjdbc.mysql.sql
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/jcr-sjdbc.mysql.sql 2011-07-28
13:07:41 UTC (rev 4687)
+++
jcr/trunk/exo.jcr.component.core/src/main/resources/conf/storage/jcr-sjdbc.mysql.sql 2011-07-29
14:37:45 UTC (rev 4688)
@@ -5,7 +5,7 @@
CREATE TABLE JCR_SITEM(
ID VARCHAR(96) NOT NULL,
PARENT_ID VARCHAR(96) NOT NULL,
- NAME VARCHAR(512) NOT NULL,
+ NAME VARCHAR(512) CHARSET latin1 COLLATE latin1_general_cs NOT NULL,
VERSION INTEGER NOT NULL,
CONTAINER_NAME VARCHAR(96) NOT NULL,
I_CLASS INTEGER NOT NULL,
Modified:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/writing/TestAddNode.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/writing/TestAddNode.java 2011-07-28
13:07:41 UTC (rev 4687)
+++
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/writing/TestAddNode.java 2011-07-29
14:37:45 UTC (rev 4688)
@@ -68,6 +68,25 @@
super.tearDown();
}
+ /**
+ * Test case-sensitive names
+ */
+ public void testAddNodeCSNames() throws RepositoryException
+ {
+ try
+ {
+ Node localRoot = root.addNode("testCI", "nt:folder");
+ root.save();
+ localRoot.addNode("test", "nt:folder");
+ localRoot.addNode("Test", "nt:folder");
+ root.save();
+ }
+ catch (ItemExistsException e)
+ {
+ fail("Repository must be case-sensitive!");
+ }
+ }
+
public void testAddNode() throws RepositoryException
{
Node root = session.getRootNode();
@@ -201,10 +220,14 @@
String[] wsNames = repository.getWorkspaceNames();
if (wsNames.length < 2)
+ {
fail("Too few number of ws for test should be > 1");
+ }
log.debug(">>>>>>>> " + wsNames.length);
for (int i = 0; i < wsNames.length; i++)
+ {
log.debug(">>>>>>>> " + wsNames[i]);
+ }
// Session s1 = repository.login(credentials, wsNames[0]);
Session s1 = repository.getSystemSession(wsNames[0]);
Show replies by date