Page 1 of 1

module_templates prevents charset change

Posted: Wed Oct 03, 2007 7:33 pm
by pgoneill
I'm going through changing my database to utf8_general_ci.  Until I reached the table "module_templates".

Code: Select all

Error

SQL query:

ALTER TABLE `module_templates` CHANGE `module_name` `module_name` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
CHANGE `template_name` `template_name` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
CHANGE `content` `content` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL

MySQL said: Documentation
#1071 - Specified key was too long; max key length is 1000 bytes 
The problem is apparently due to module_name and template_name being indexes.  Is there a reason for that?

I changed my MySQL server to default to utf8.  Should I switch it back to latin1 (why it chooses latin1_swedish_ci is beyond me) so I can install CMSMS in the future?

EDIT: Interesting.  I have another install of CMSMS that's using utf8_general_ci for everything.  Works fine.  Any idea why I can't change this one?

EDIT2: Seems to be template_name causing the problem.  Here are the values:

calendar
default
default_display
detailDefault
displaydetails
displaylist
displayresult
displaysearch
displaysubmit
displaysummary
event
feusers_changesettingsform
feusers_forgotpasswordemailform
feusers_forgotpasswordform
feusers_forgotpasswordverifyform
feusers_loginform
feusers_logoutform
list
summaryBDCalls
summaryDefault
upcominglist
xnet

One of these is maxing out the 1000 byte index size limit.

Re: module_templates prevents charset change

Posted: Wed Oct 03, 2007 9:09 pm
by alby
pgoneill wrote: I'm going through changing my database to utf8_general_ci.  Until I reached the table "module_templates".

Code: Select all

Error

MySQL said: Documentation
#1071 - Specified key was too long; max key length is 1000 bytes
The problem is apparently due to module_name and template_name being indexes.  Is there a reason for that?

........................

One of these is maxing out the 1000 byte index size limit.
Read this topic

Alby

Re: module_templates prevents charset change

Posted: Wed Oct 03, 2007 9:56 pm
by pgoneill
OK, I changed the VARCHAR lengths to 150 and it seems to have worked.  Thanks - I didn't see that post when I searched for it. :(