You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Stephen More (JIRA)" <ji...@apache.org> on 2007/08/01 22:32:53 UTC

[jira] Created: (JCR-1049) mysql.ddl works for mysql5 but not mysql 4.1.20

mysql.ddl works for mysql5 but not mysql 4.1.20
-----------------------------------------------

                 Key: JCR-1049
                 URL: https://issues.apache.org/jira/browse/JCR-1049
             Project: Jackrabbit
          Issue Type: Bug
    Affects Versions: 1.3
         Environment: MySQL 4.1.20
ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
            Reporter: Stephen More


Perhaps a new column ( primary key ) could get added to the table called uid, which is actually an md5checksum of FSENTRY_PATH and FSENTRY_NAME.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1049) DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520187 ] 

Stefan Guggisberg commented on JCR-1049:
----------------------------------------

> mysql4.dll and mysql.ddl should have:
> create unique index JCR_FSENTRY_IDX on JCR_FSENTRY (FSENTRY_PATH(745), FSENTRY_NAME);

that's not a good idea since the max key limit is storage engine & mysql version dependant.

<quote src="http://dev.mysql.com/doc/refman/4.1/en/create-index.html">
Prefix lengths are storage engine-dependent (for example, a prefix can be up to 1000 bytes long for MyISAM tables, 767 bytes for InnoDB tables). (Before MySQL 4.1.2, the limit is 255 bytes for all tables.) Note that prefix limits are measured in bytes, whereas the prefix length in CREATE INDEX statements is interpreted as number of characters for non-binary data types (CHAR, VARCHAR, TEXT). Take this into account when specifying a prefix length for a column that uses a multi-byte character set.
</quote>

the current 'create unique index' stmt in mysql.ddl is IMO a good compromise that will work with most  mysql servers out there. 





> DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20
> -------------------------------------------------------------------
>
>                 Key: JCR-1049
>                 URL: https://issues.apache.org/jira/browse/JCR-1049
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.3
>         Environment: MySQL 4.1.20
> ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
>            Reporter: Stephen More
>            Assignee: Stefan Guggisberg
>
> Perhaps a new column ( primary key ) could get added to the table called uid, which is actually an md5checksum of FSENTRY_PATH and FSENTRY_NAME.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1049) DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-1049:
-------------------------------

    Affects Version/s: 1.2.1
                       1.2.2
                       1.2.3
                       1.3.1
        Fix Version/s: 1.3.2

Merged to the 1.3 branch in revision 577850.

> DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20
> -------------------------------------------------------------------
>
>                 Key: JCR-1049
>                 URL: https://issues.apache.org/jira/browse/JCR-1049
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.2.1, 1.2.2, 1.2.3, 1.3, 1.3.1
>         Environment: MySQL 4.1.20
> ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
>            Reporter: Stephen More
>            Assignee: Stefan Guggisberg
>             Fix For: 1.3.2
>
>
> Perhaps a new column ( primary key ) could get added to the table called uid, which is actually an md5checksum of FSENTRY_PATH and FSENTRY_NAME.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (JCR-1049) DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20

Posted by "Stephen More (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen More reopened JCR-1049:
-------------------------------


I am sorry, but IMO this does not seem like a reasonable solution.

Mysql fixed this bug ( not config ) as of 5.0.19 - http://bugs.mysql.com/bug.php?id=13835 

To support older databases, mysql4.ddl should get created with:
create table ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH text not null, FSENTRY_NAME varchar(255) not null, FSENTRY_DATA longblob null, FSENTRY_LASTMOD bigint not null, FSENTRY_LENGTH bigint not null) charset latin1

This allows the developer to choose the right schema in his/her application without having to download the code, create a patch, then do it all over again after the next release.



mysql4.dll and mysql.ddl should have:
create unique index JCR_FSENTRY_IDX on JCR_FSENTRY (FSENTRY_PATH(745), FSENTRY_NAME);









> DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20
> -------------------------------------------------------------------
>
>                 Key: JCR-1049
>                 URL: https://issues.apache.org/jira/browse/JCR-1049
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.3
>         Environment: MySQL 4.1.20
> ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
>            Reporter: Stephen More
>            Assignee: Stefan Guggisberg
>
> Perhaps a new column ( primary key ) could get added to the table called uid, which is actually an md5checksum of FSENTRY_PATH and FSENTRY_NAME.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JCR-1049) DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Guggisberg resolved JCR-1049.
------------------------------------

    Resolution: Fixed

added 'character set latin1'  to 'create table' statement

fixed in svn r566639

> DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20
> -------------------------------------------------------------------
>
>                 Key: JCR-1049
>                 URL: https://issues.apache.org/jira/browse/JCR-1049
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.3
>         Environment: MySQL 4.1.20
> ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
>            Reporter: Stephen More
>            Assignee: Stefan Guggisberg
>
> Perhaps a new column ( primary key ) could get added to the table called uid, which is actually an md5checksum of FSENTRY_PATH and FSENTRY_NAME.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1049) DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Guggisberg updated JCR-1049:
-----------------------------------

    Component/s: core
        Summary: DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20  (was: mysql.ddl works for mysql5 but not mysql 4.1.20)

> DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20
> -------------------------------------------------------------------
>
>                 Key: JCR-1049
>                 URL: https://issues.apache.org/jira/browse/JCR-1049
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.3
>         Environment: MySQL 4.1.20
> ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
>            Reporter: Stephen More
>
> Perhaps a new column ( primary key ) could get added to the table called uid, which is actually an md5checksum of FSENTRY_PATH and FSENTRY_NAME.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1049) DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520024 ] 

Stefan Guggisberg commented on JCR-1049:
----------------------------------------

> Mysql fixed this bug ( not config ) as of 5.0.19 - http://bugs.mysql.com/bug.php?id=13835

this mysql bug is IMO unrelated to the current issue because it refers to fulltext indices which are not used in jackrabbit.
fulltext indices don't have a size limit (hence the mysql bug), but regular indices do.

> DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20
> -------------------------------------------------------------------
>
>                 Key: JCR-1049
>                 URL: https://issues.apache.org/jira/browse/JCR-1049
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.3
>         Environment: MySQL 4.1.20
> ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
>            Reporter: Stephen More
>            Assignee: Stefan Guggisberg
>
> Perhaps a new column ( primary key ) could get added to the table called uid, which is actually an md5checksum of FSENTRY_PATH and FSENTRY_NAME.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JCR-1049) DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Guggisberg resolved JCR-1049.
------------------------------------

    Resolution: Won't Fix
      Assignee: Stefan Guggisberg

hi stephen,

thanks for reporting this issue.

this issue has been reported a while ago on the dev-list. you can find the
discussion (incl. solutions) here:
http://www.mail-archive.com/dev@jackrabbit.apache.org/msg00969.html

i'm resolving this issue as "Won't Fix" since it's IMO rather a db configuration issue.

cheers
stefan

> DatabaseFileSystem: mysql.ddl works for mysql5 but not mysql 4.1.20
> -------------------------------------------------------------------
>
>                 Key: JCR-1049
>                 URL: https://issues.apache.org/jira/browse/JCR-1049
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.3
>         Environment: MySQL 4.1.20
> ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
>            Reporter: Stephen More
>            Assignee: Stefan Guggisberg
>
> Perhaps a new column ( primary key ) could get added to the table called uid, which is actually an md5checksum of FSENTRY_PATH and FSENTRY_NAME.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.