You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by herbert <io...@gmx.de> on 2009/08/14 11:35:37 UTC

Generation of Jackrabbit-tables in MySQL

Hi,

we've integrated Jackrabbit into JBoss-Portal with MySQL as the underlying
database.

The default-charset of MySQL is set to UTF-8.

During first startup jackrabbit creates its tables in the MySQL-Database.

These tables are generated with the character set UTF-8:
datastore, default_bundle, default_names, default_refs, version_binval,
version_bundle, version_names, version_refs.

These tables are generated with the character set Latin1:
default_fsentry, repo_fsentry, version_fsentry.

I wonder, why the *_fsentry-tables get the character set Latin1? (Btw, this
happens on windows-systems and also on linux-systems)

Can anyone explain the latin1-encoding? Is there a way to set the encoding
of these tables to UTF-8?

Regards, Herbert




-- 
View this message in context: http://www.nabble.com/Generation-of-Jackrabbit-tables-in-MySQL-tp24968945p24968945.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Generation of Jackrabbit-tables in MySQL

Posted by Stefan Guggisberg <st...@gmail.com>.
On Fri, Aug 14, 2009 at 2:50 PM, Stefan
Guggisberg<st...@gmail.com> wrote:
> On Fri, Aug 14, 2009 at 2:42 PM, herbert<io...@gmx.de> wrote:
>>
>> Hi,
>>
>>
>> Stefan Guggisberg wrote:
>>>
>>>> Btw, what is saved in the *_fsentry-tables?
>>> it stores the file-system entries (files & folders) of a virtual file
>>> system.
>>>
>>
>> Ah, okay, so since its a jackrabbit-"internal" *virtual* file system the
>> latin1-filename-encoding there won't conflict with the
>> UTF-8-filename-encoding on my linux-box, right?
>
> no :)

i.e. yes, it won't conflict :)

>
>>
>> Thanks, for your answers,
>>
>> Regards, Herbert
>>
>> --
>> View this message in context: http://www.nabble.com/Generation-of-Jackrabbit-tables-in-MySQL-tp24968945p24971094.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
>

Re: Generation of Jackrabbit-tables in MySQL

Posted by Stefan Guggisberg <st...@gmail.com>.
On Fri, Aug 14, 2009 at 2:42 PM, herbert<io...@gmx.de> wrote:
>
> Hi,
>
>
> Stefan Guggisberg wrote:
>>
>>> Btw, what is saved in the *_fsentry-tables?
>> it stores the file-system entries (files & folders) of a virtual file
>> system.
>>
>
> Ah, okay, so since its a jackrabbit-"internal" *virtual* file system the
> latin1-filename-encoding there won't conflict with the
> UTF-8-filename-encoding on my linux-box, right?

no :)

>
> Thanks, for your answers,
>
> Regards, Herbert
>
> --
> View this message in context: http://www.nabble.com/Generation-of-Jackrabbit-tables-in-MySQL-tp24968945p24971094.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>

Re: Generation of Jackrabbit-tables in MySQL

Posted by herbert <io...@gmx.de>.
Hi,


Stefan Guggisberg wrote:
> 
>> Btw, what is saved in the *_fsentry-tables?
> it stores the file-system entries (files & folders) of a virtual file
> system.
> 

Ah, okay, so since its a jackrabbit-"internal" *virtual* file system the
latin1-filename-encoding there won't conflict with the
UTF-8-filename-encoding on my linux-box, right?

Thanks, for your answers,

Regards, Herbert

-- 
View this message in context: http://www.nabble.com/Generation-of-Jackrabbit-tables-in-MySQL-tp24968945p24971094.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Generation of Jackrabbit-tables in MySQL

Posted by Stefan Guggisberg <st...@gmail.com>.
On Fri, Aug 14, 2009 at 2:17 PM, herbert<io...@gmx.de> wrote:
>
> Hi,
>
>>> I wonder, why the *_fsentry-tables get the character set Latin1?
>>> (Btw, this happens on windows-systems and also on linux-systems)
>
>>Yes, because "character set latin1" hardcoded in
>>org/apache/jackrabbit/core/fs/db/mysql.sql
>
> Thank you guys, for the quick and informative answers.
>
> So far, I don't have any issues with these latin-tables, but since we are
> just defining a consistent encoding throughout our whole system, we would
> have liked to use here UTF-8 also.
> (The server runs on linux, so we would have preferred UTF-8 over Latin1.)
>
> But if this may lead to problems as described in JCR-1049 we will stick with
> Latin1 on these *_fsentry-tables.
>
> Btw, what is saved in the *_fsentry-tables?

it stores the file-system entries (files & folders) of a virtual file system.

see
http://jackrabbit.apache.org/jackrabbit-configuration.html#JackrabbitConfiguration-Filesystemconfiguration
http://jackrabbit.apache.org/api/1.5/org/apache/jackrabbit/core/fs/db/DbFileSystem.html

it's not used by default.

cheers
stefan

>
> Regards, Herbert
> --
> View this message in context: http://www.nabble.com/Generation-of-Jackrabbit-tables-in-MySQL-tp24968945p24970792.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>

Re: Generation of Jackrabbit-tables in MySQL

Posted by herbert <io...@gmx.de>.
Hi,

>> I wonder, why the *_fsentry-tables get the character set Latin1?
>> (Btw, this happens on windows-systems and also on linux-systems)

>Yes, because "character set latin1" hardcoded in
>org/apache/jackrabbit/core/fs/db/mysql.sql

Thank you guys, for the quick and informative answers.

So far, I don't have any issues with these latin-tables, but since we are
just defining a consistent encoding throughout our whole system, we would
have liked to use here UTF-8 also.
(The server runs on linux, so we would have preferred UTF-8 over Latin1.)

But if this may lead to problems as described in JCR-1049 we will stick with
Latin1 on these *_fsentry-tables.

Btw, what is saved in the *_fsentry-tables?

Regards, Herbert
-- 
View this message in context: http://www.nabble.com/Generation-of-Jackrabbit-tables-in-MySQL-tp24968945p24970792.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Generation of Jackrabbit-tables in MySQL

Posted by Thomas Müller <th...@day.com>.
Hi,

> I wonder, why the *_fsentry-tables get the character set Latin1?
> (Btw, this happens on windows-systems and also on linux-systems)

Yes, because "character set latin1" hardcoded in
org/apache/jackrabbit/core/fs/db/mysql.sql

> Can anyone explain the latin1-encoding?

I don't know, but I guess to ensure no 'strange' encoding is used for
the file system, to ensure the file system always works. We could
probably hardcode UTF-8. I don't think it matters.

> Is there a way to set the encoding of these tables to UTF-8?

You could (change mysql.sql, or create a new file and use that:
databaseType=myown_mysql).
But why is it important for you?

Regards,
Thomas

Re: Generation of Jackrabbit-tables in MySQL

Posted by Stefan Guggisberg <st...@gmail.com>.
hi herbert

On Fri, Aug 14, 2009 at 11:35 AM, herbert<io...@gmx.de> wrote:
>
> Hi,
>
> we've integrated Jackrabbit into JBoss-Portal with MySQL as the underlying
> database.
>
> The default-charset of MySQL is set to UTF-8.
>
> During first startup jackrabbit creates its tables in the MySQL-Database.
>
> These tables are generated with the character set UTF-8:
> datastore, default_bundle, default_names, default_refs, version_binval,
> version_bundle, version_names, version_refs.
>
> These tables are generated with the character set Latin1:
> default_fsentry, repo_fsentry, version_fsentry.
>
> I wonder, why the *_fsentry-tables get the character set Latin1? (Btw, this
> happens on windows-systems and also on linux-systems)
>
> Can anyone explain the latin1-encoding?

please see http://issues.apache.org/jira/browse/JCR-1049

> Is there a way to set the encoding of these tables to UTF-8?

you could perhaps change the encoding with an "alter table..." statement.
alternatively, you could create your own .ddl script.

please keep in mind that latin1 has been chosen on purpose as utf-8 leads to
the issue described in JCR-1049.

why do you want to change the encoding?

cheers
stefan

>
> Regards, Herbert
>
>
>
>
> --
> View this message in context: http://www.nabble.com/Generation-of-Jackrabbit-tables-in-MySQL-tp24968945p24968945.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>