Author Topic: MySQL BaseModel  (Read 3390 times)

akede

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
MySQL BaseModel
« on: December 01, 2005, 01:54:40 am »
Hey,

I just tried again to install a MySQL repository for my project. Actual MySQL 4.1.15 including UTF-8 support.

Now I get the error

CREATE TABLE t_objectproblems(
Object_ID int( 11 ) NOT NULL default '0',
Problem varchar( 255 ) NOT NULL ,
ProblemType varchar( 200 ) NOT NULL ,
DateReported date,
`Status` varchar( 50 ) ,
ProblemNotes text,
ReportedBy varchar( 255 ) ,
ResolvedBy varchar( 255 ) ,
DateResolved date,
`Version` varchar( 50 ) ,
ResolverNotes text,
Priority varchar( 100 ) ,
Severity varchar( 50 ) ,
PRIMARY KEY ( Object_ID, ProblemType, Problem ) ,
INDEX ObjectID( Object_ID ) ,
INDEX ObjectRequiresRequirement( Problem )
) TYPE = InnoDB COMMENT = "InnoDB free: 87040 kB"

MySQL error:
#1071 - Specified key was too long; max key length is 1024 bytes

Basically I do understand what this means, but is there any other solution than removing ProblemType, Problem from the PK?

Alex

PS: I'm wondering how you created these tables in first place - may be there is a configuration option that I can't find.
« Last Edit: December 01, 2005, 01:56:23 am by akede »
Alex

~~~~~~~~~~~~~~~~~~~~~~~~~~~
Think Network GmbH, Munich Germany
http://www.thinknetwork.com

thomaskilian

  • Guest
Re: MySQL BaseModel
« Reply #1 on: December 01, 2005, 03:28:00 am »
Are you trying to say, that MySQL throws that error when you create the database with the scripts from Sparx download area? If so there seems to be something wrong with your MySQL environment. Just a few weeks ago I installed a repository with the (then) recent release.

akede

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: MySQL BaseModel
« Reply #2 on: December 01, 2005, 03:32:37 am »
Hey Thomas,

actually yes that's what I'm saying.

On which MySQL Version and charset did you installed it?

I just downloaded all files new from the site and also created a new DB. For me everything is running at MySQL 4.1.15 with UTF-8 support and InnoDB enabled.

Tried both, InnoDB and MyISAM tables - both are reporting similar errors.

Alex

Quote
Are you trying to say, that MySQL throws that error when you create the database with the scripts from Sparx download area? If so there seems to be something wrong with your MySQL environment. Just a few weeks ago I installed a repository with the (then) recent release.

Alex

~~~~~~~~~~~~~~~~~~~~~~~~~~~
Think Network GmbH, Munich Germany
http://www.thinknetwork.com

thomaskilian

  • Guest
Re: MySQL BaseModel
« Reply #3 on: December 01, 2005, 03:39:09 am »
I installed vanilla 4.1.14 and had no problems. Maybe .15 behaves a bit beta?

akede

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: MySQL BaseModel
« Reply #4 on: December 01, 2005, 04:12:29 am »
Quote
I installed vanilla 4.1.14 and had no problems. Maybe .15 behaves a bit beta?



No I think the problem here is the UTF-8 integration. This is a new feature with some other stuff for the 4.1.15 and I know from other projects that UTF-8 is causing much bigger table columns and indexes :(

Alex
Alex

~~~~~~~~~~~~~~~~~~~~~~~~~~~
Think Network GmbH, Munich Germany
http://www.thinknetwork.com