Continuum

Continuum doesn't work with MySQL

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1-alpha-1
  • Fix Version/s: 1.1-beta-1
  • Component/s: Database
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    1

Description

2006-10-20 19:23:14,288 [WrapperSimpleAppMain] ERROR RDBMS - Error thrown executing CREATE TABLE `PROJECTNOTIFIER_CONFIGURATION`

[SNIP]

2006/10/20 19:23:14 | java.sql.SQLException: BLOB/TEXT column 'STRING_KEY' used in key specification without a key length

Issue Links

Activity

Hide
Carlos Sanchez added a comment -

There is a problem with JDO And MySQL versions < 5.0.3
http://www.jpox.org/servlet/forum/viewthread?thread=3219#16867
It was fixed in apache rev# 486806

Seems to have been fixed in 5.0.3
http://bugs.mysql.com/bug.php?id=9075
rev# 486806 is to be reverted to avoid backwards compatibility problems and test in MySQL 5.0.3+

Show
Carlos Sanchez added a comment - There is a problem with JDO And MySQL versions < 5.0.3 http://www.jpox.org/servlet/forum/viewthread?thread=3219#16867 It was fixed in apache rev# 486806 Seems to have been fixed in 5.0.3 http://bugs.mysql.com/bug.php?id=9075 rev# 486806 is to be reverted to avoid backwards compatibility problems and test in MySQL 5.0.3+
Hide
Carlos Sanchez added a comment -

I filed an issue in MySQL, the fix they made was not complete and primary keys can't be of 256 length
http://bugs.mysql.com/bug.php?id=25480

Show
Carlos Sanchez added a comment - I filed an issue in MySQL, the fix they made was not complete and primary keys can't be of 256 length http://bugs.mysql.com/bug.php?id=25480
Hide
Rahul Thakur added a comment -

Hi Carlos,
I noticed you logged the issue for MySQL 5.0.27, I am on 5.024 and I am able to create a table here, please see output below:

========================================================
E:\>
E:\>mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 5.0.24-community-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
mysql> use test_mysql
Database changed
mysql>
mysql> CREATE TABLE `MYTABLE`
-> (
-> `NAME` VARCHAR(300) BINARY NOT NULL,
-> PRIMARY KEY (`NAME`)
-> ) ENGINE=INNODB;
Query OK, 0 rows affected (0.11 sec)

mysql> show create table MYTABLE \G;

                                                      • 1. row ***************************
                                                        Table: MYTABLE
                                                        Create Table: CREATE TABLE `mytable` (
                                                        `NAME` varchar(300) character set latin1 collate latin1_bin NOT NULL,
                                                        PRIMARY KEY (`NAME`)
                                                        ) ENGINE=InnoDB DEFAULT CHARSET=latin1
                                                        1 row in set (0.00 sec)

ERROR:
No query specified

===========================================================

Show
Rahul Thakur added a comment - Hi Carlos, I noticed you logged the issue for MySQL 5.0.27, I am on 5.024 and I am able to create a table here, please see output below: ======================================================== E:\> E:\>mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 to server version: 5.0.24-community-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> mysql> use test_mysql Database changed mysql> mysql> CREATE TABLE `MYTABLE` -> ( -> `NAME` VARCHAR(300) BINARY NOT NULL, -> PRIMARY KEY (`NAME`) -> ) ENGINE=INNODB; Query OK, 0 rows affected (0.11 sec) mysql> show create table MYTABLE \G;
                                                      • 1. row *************************** Table: MYTABLE Create Table: CREATE TABLE `mytable` ( `NAME` varchar(300) character set latin1 collate latin1_bin NOT NULL, PRIMARY KEY (`NAME`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec)
ERROR: No query specified ===========================================================
Hide
Carlos Sanchez added a comment -

Last comment in mysql bug says it's verified. Seems it depends on the character set of your DB

What's your output of
show variables like "%char%";

Show
Carlos Sanchez added a comment - Last comment in mysql bug says it's verified. Seems it depends on the character set of your DB What's your output of show variables like "%char%";
Hide
Rahul Thakur added a comment -

Here:

mysql>
mysql> show variables like "%char%";
--------------------------------------------------+

Variable_name Value

--------------------------------------------------+

character_set_client latin1
character_set_connection latin1
character_set_database latin1
character_set_filesystem binary
character_set_results latin1
character_set_server latin1
character_set_system utf8
character_sets_dir c:\mysql\share\charsets\

--------------------------------------------------+
8 rows in set (0.81 sec)

Show
Rahul Thakur added a comment - Here: mysql> mysql> show variables like "%char%"; --------------------------------------------------+
Variable_name Value
--------------------------------------------------+
character_set_client latin1
character_set_connection latin1
character_set_database latin1
character_set_filesystem binary
character_set_results latin1
character_set_server latin1
character_set_system utf8
character_sets_dir c:\mysql\share\charsets\
--------------------------------------------------+ 8 rows in set (0.81 sec)
Hide
Carlos Sanchez added a comment -

The problem is when the database is in utf8 charset

Show
Carlos Sanchez added a comment - The problem is when the database is in utf8 charset
Hide
Carlos Sanchez added a comment -

Patch to be applied in sources to ensure compatibility with MySQL < 5.0.3 or using UTF8 databases until the MySQL bug http://bugs.mysql.com/bug.php?id=25480 is fixed.

It can be applied to the built version, to WEB-INF/classes/META-INF/plexus/application.xml

Add inside component org.codehaus.plexus.jdo.JdoFactory, configuration, otherProperties:

<!-- this is required for some MySQL versions and configurations, see CONTINUUM-1113 -->
<property>
<name>org.jpox.rdbms.stringDefaultLength</name>
<value>255</value>
</property>

Show
Carlos Sanchez added a comment - Patch to be applied in sources to ensure compatibility with MySQL < 5.0.3 or using UTF8 databases until the MySQL bug http://bugs.mysql.com/bug.php?id=25480 is fixed. It can be applied to the built version, to WEB-INF/classes/META-INF/plexus/application.xml Add inside component org.codehaus.plexus.jdo.JdoFactory, configuration, otherProperties: <!-- this is required for some MySQL versions and configurations, see CONTINUUM-1113 --> <property> <name>org.jpox.rdbms.stringDefaultLength</name> <value>255</value> </property>
Hide
Carlos Sanchez added a comment -

Use MySQL > 5.0.3 with a non UTF8 database until their bug is fixed, or apply changes to the application.xml as detailed in previous comment

Show
Carlos Sanchez added a comment - Use MySQL > 5.0.3 with a non UTF8 database until their bug is fixed, or apply changes to the application.xml as detailed in previous comment
Hide
Carlos Sanchez added a comment -

Seems that MySQL decided it's not a bug in their side, althought it's really inconsistent
http://bugs.mysql.com/bug.php?id=25480

Show
Carlos Sanchez added a comment - Seems that MySQL decided it's not a bug in their side, althought it's really inconsistent http://bugs.mysql.com/bug.php?id=25480
Hide
fabrizio giustina added a comment -

patch tested and committed. Using a default column length of 255 instead of 256 is enough to make continuum work with MySql UTF8 dbs out of the box.

Show
fabrizio giustina added a comment - patch tested and committed. Using a default column length of 255 instead of 256 is enough to make continuum work with MySql UTF8 dbs out of the box.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: