<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 05/11/2010 10:25 AM, Nicolas Filotto wrote:
<blockquote
 cite="mid:AANLkTinGYKw-klwk7ca7XYYIYUcKw17W985REIY4JnE9@mail.gmail.com"
 type="cite">Unfortunately, changing from&nbsp;
  <meta charset="utf-8">
VARCHAR to&nbsp;
  <meta charset="utf-8">
VARBINARY is just impossible at this stage since several versions of
eXo JCR 1.12 have already been released and those version would then be
incompatible. Moreover, I'm&nbsp;pretty sure that it will create side
effects more&nbsp;painful than case sensitivity issues.
  <div><br>
  </div>
  <div>The only way to solve this problem is to specify clearly in the
doc that the database must be case insensitive.<br>
  </div>
</blockquote>
Can this be set at DB level ? I thought it was at table level ? And
since tables are created by JCR it's a bit tricky.<br>
<br>
We're going without any change, it's not as bad as I originally thought
it was, I'm still curious about the possibilities though.<br>
<br>
<blockquote
 cite="mid:AANLkTinGYKw-klwk7ca7XYYIYUcKw17W985REIY4JnE9@mail.gmail.com"
 type="cite">
  <div><br>
  <div class="gmail_quote">On Mon, May 10, 2010 at 8:44 PM, Matthew
Wringe <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:mwringe@redhat.com">mwringe@redhat.com</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div>
    <div class="h5">On Fri, 2010-05-07 at 19:16 -0400, Matthew Wringe
wrote:<br>
&gt; On Thu, 2010-05-06 at 22:49 +0200, Thomas Heute wrote:<br>
&gt; &gt;<br>
&gt; &gt; The great MySQL and MSSQL made that choice that tables (by
default) are<br>
&gt; &gt; made case insensitive.<br>
&gt; &gt; Meaning that 'foobar' is the same as 'FooBar'.<br>
&gt; &gt; Today if you create a portal or a page 'toto' and then 'tOtO'
it will<br>
&gt; &gt; work for other databases but for MySQL or MSSQL it will fail.<br>
&gt;<br>
&gt; Page names that vary only in case work fine for me with MySQL, but
I do<br>
&gt; experience the problem with portal names.<br>
&gt;<br>
&gt; &gt; We should prevent to have 2 portal names that are the same
(case<br>
&gt; &gt; insensitive). We can't do a simple JCR query (AFAIK) to
verify if 2<br>
&gt; &gt; portal names are the same (case insensitive), unless we try
and catch an<br>
&gt; &gt; error. But the error would only happen for those 2 and would
potentially<br>
&gt; &gt; make a migration from 1 DB to another difficult since they
would react<br>
&gt; &gt; differently.<br>
&gt;<br>
&gt; The problem is that we have a field name which as part of it
contains<br>
&gt; the portal name, and MySQL is converting this into lower case. This<br>
&gt; doesn't actually store the portal name, and its not used as a key
(nor<br>
&gt; is it set as unique).<br>
&gt;<br>
&gt; I created a quick hack in the jcr that would allow for it to get<br>
&gt; multiple values back from the sql query and check them to return
only<br>
&gt; the correct result.<br>
&gt;<br>
&gt; This appears to work, and it gives the correct error messages about<br>
&gt; portals existing or not. BUT, there is some unique index restraint
setup<br>
&gt; somewhere which is preventing me from saving the data back to the<br>
&gt; database :(<br>
&gt;<br>
&gt; &gt; The other option is to transform all ids to lowercase before
storing in<br>
&gt; &gt; Database so we are safe with all database. I actually think
it would be<br>
&gt; &gt; a good practice as those ids appear in the URL which are
usually all in<br>
&gt; &gt; lowercase.<br>
&gt;<br>
&gt; The urls are not in lowercase though, if we want to access the
'classic'<br>
&gt; or 'CLASSIC' portal, we can't have the url all in lowercase.<br>
&gt;<br>
&gt; &gt; Or if anyone think about any other option ?<br>
&gt;<br>
&gt; Is there not some sort of case sensitive mode in MySQL that we can
have<br>
&gt; as a requirement for use with GateIn? The user already needs to
setup<br>
&gt; and configure the db anyways.<br>
    <br>
    </div>
    </div>
We can easily change this by making the table use VARBINARY for the<br>
field instead of VARCHAR. There is a jira for here<br>
    <a moz-do-not-send="true"
 href="https://jira.jboss.org/jira/browse/JBEPP-334" target="_blank">https://jira.jboss.org/jira/browse/JBEPP-334</a>
with a patch attached.<br>
Someone working on the JCR will need to make this change.<br>
    <div>
    <div class="h5"><br>
&gt;<br>
&gt; &gt; Thomas.<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; gatein-dev mailing list<br>
&gt; &gt; <a moz-do-not-send="true"
 href="mailto:gatein-dev@lists.jboss.org">gatein-dev@lists.jboss.org</a><br>
&gt; &gt; <a moz-do-not-send="true"
 href="https://lists.jboss.org/mailman/listinfo/gatein-dev"
 target="_blank">https://lists.jboss.org/mailman/listinfo/gatein-dev</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gatein-dev mailing list<br>
&gt; <a moz-do-not-send="true" href="mailto:gatein-dev@lists.jboss.org">gatein-dev@lists.jboss.org</a><br>
&gt; <a moz-do-not-send="true"
 href="https://lists.jboss.org/mailman/listinfo/gatein-dev"
 target="_blank">https://lists.jboss.org/mailman/listinfo/gatein-dev</a><br>
    <br>
    <br>
_______________________________________________<br>
gatein-dev mailing list<br>
    <a moz-do-not-send="true" href="mailto:gatein-dev@lists.jboss.org">gatein-dev@lists.jboss.org</a><br>
    <a moz-do-not-send="true"
 href="https://lists.jboss.org/mailman/listinfo/gatein-dev"
 target="_blank">https://lists.jboss.org/mailman/listinfo/gatein-dev</a><br>
    </div>
    </div>
  </blockquote>
  </div>
  <br>
  <br clear="all">
  <br>
-- <br>
Nicolas Filotto<br>
JCR Product Manager<br>
Project Manager<br>
eXo Platform SAS<br>
  <a moz-do-not-send="true"
 href="mailto:nicolas.filotto@exoplatform.com">nicolas.filotto@exoplatform.com</a><br>
+33 (0)6 31 32 92 19 &nbsp;<br>
  </div>
</blockquote>
<br>
</body>
</html>