<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: How to understand key length limitations in MySQL</title>
	<atom:link href="http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/</link>
	<description>Stay curious!</description>
	<pubDate>Fri, 21 Nov 2008 06:13:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Nan</title>
		<link>http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/#comment-14136</link>
		<dc:creator>Nan</dc:creator>
		<pubDate>Tue, 08 Jan 2008 20:21:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=129#comment-14136</guid>
		<description>The problem appears to be the combined column's length.  For example, if the primary key is specified with more than 1 columns, then the total length is tested for this limit, and it'll fail if it's over 999.</description>
		<content:encoded><![CDATA[<p>The problem appears to be the combined column&#8217;s length.  For example, if the primary key is specified with more than 1 columns, then the total length is tested for this limit, and it&#8217;ll fail if it&#8217;s over 999.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/#comment-887</link>
		<dc:creator>Xaprb</dc:creator>
		<pubDate>Fri, 16 Jun 2006 11:59:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=129#comment-887</guid>
		<description>&lt;p&gt;I don't know any other workaround unless you can make the columns smaller, or remove the index completely.  I have no idea whether Mambo really needs those columns to be 240 characters long, or whether they really need to be indexed.  If the unique index is only there to ensure no duplicate columns exist, maybe that can be coded in the application logic instead.  It is usually a very bad idea to make indexes on such long columns.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know any other workaround unless you can make the columns smaller, or remove the index completely.  I have no idea whether Mambo really needs those columns to be 240 characters long, or whether they really need to be indexed.  If the unique index is only there to ensure no duplicate columns exist, maybe that can be coded in the application logic instead.  It is usually a very bad idea to make indexes on such long columns.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nazar Hotsa</title>
		<link>http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/#comment-886</link>
		<dc:creator>Nazar Hotsa</dc:creator>
		<pubDate>Fri, 16 Jun 2006 09:24:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=129#comment-886</guid>
		<description>&lt;p&gt;Well, I know this solution :) I can set also cp1251 encoding, etc.&lt;/p&gt;

&lt;p&gt;My concern is that I'm going to create a 3-language website, that will use English, Russian, and Ukrainian languages. That's why I need utf8 here...&lt;/p&gt;

&lt;p&gt;I guess this is impossible for now. Am I right?&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Well, I know this solution :) I can set also cp1251 encoding, etc.</p>
<p>My concern is that I&#8217;m going to create a 3-language website, that will use English, Russian, and Ukrainian languages. That&#8217;s why I need utf8 here&#8230;</p>
<p>I guess this is impossible for now. Am I right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/#comment-878</link>
		<dc:creator>Xaprb</dc:creator>
		<pubDate>Wed, 14 Jun 2006 18:57:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=129#comment-878</guid>
		<description>&lt;p&gt;Nazar,&lt;/p&gt;

&lt;p&gt;It looks like this statement in &lt;code&gt;installation/sql/mambo.sql&lt;/code&gt; is causing the problem:&lt;/p&gt;

&lt;pre&gt;CREATE TABLE `#__core_acl_aro` (
  `aro_id` int(11) NOT NULL auto_increment,
  `section_value` varchar(240) NOT NULL default '0',
  `value` varchar(240) NOT NULL default '',
  `order_value` int(11) NOT NULL default '0',
  `name` varchar(255) NOT NULL default '',
  `hidden` int(11) NOT NULL default '0',
  PRIMARY KEY  (`aro_id`),
  UNIQUE KEY `section_value_value_aro` (`section_value`,`value`),
  UNIQUE KEY `#__gacl_section_value_value_aro` (`section_value`,`value`),
  KEY `hidden_aro` (`hidden`),
  KEY `#__gacl_hidden_aro` (`hidden`)
) TYPE=MyISAM;&lt;/pre&gt;

&lt;p&gt;That is definitely going to cause a problem, and my guess is the Mambo developers are unaware of it.  They may also not know that they are duplicating indexes -- and MySQL is &lt;strong&gt;not&lt;/strong&gt; "smart enough to combine duplicate indexes."  Duplicate indexes really do get duplicated in every way, from CPU time to disk space.&lt;/p&gt;

&lt;p&gt;You should be able to edit this statement and make the charset latin1 like this:&lt;/p&gt;

&lt;pre&gt;create table (...) default charset=latin1;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Nazar,</p>
<p>It looks like this statement in <code>installation/sql/mambo.sql</code> is causing the problem:</p>
<pre>CREATE TABLE `#__core_acl_aro` (
  `aro_id` int(11) NOT NULL auto_increment,
  `section_value` varchar(240) NOT NULL default '0',
  `value` varchar(240) NOT NULL default '',
  `order_value` int(11) NOT NULL default '0',
  `name` varchar(255) NOT NULL default '',
  `hidden` int(11) NOT NULL default '0',
  PRIMARY KEY  (`aro_id`),
  UNIQUE KEY `section_value_value_aro` (`section_value`,`value`),
  UNIQUE KEY `#__gacl_section_value_value_aro` (`section_value`,`value`),
  KEY `hidden_aro` (`hidden`),
  KEY `#__gacl_hidden_aro` (`hidden`)
) TYPE=MyISAM;</pre>
<p>That is definitely going to cause a problem, and my guess is the Mambo developers are unaware of it.  They may also not know that they are duplicating indexes &#8212; and MySQL is <strong>not</strong> &#8220;smart enough to combine duplicate indexes.&#8221;  Duplicate indexes really do get duplicated in every way, from CPU time to disk space.</p>
<p>You should be able to edit this statement and make the charset latin1 like this:</p>
<pre>create table (...) default charset=latin1;</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nazar Hotsa</title>
		<link>http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/#comment-876</link>
		<dc:creator>Nazar Hotsa</dc:creator>
		<pubDate>Wed, 14 Jun 2006 14:07:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=129#comment-876</guid>
		<description>&lt;p&gt;I got this error when I install Mambo with utf-8 as default in PHPMyAdmin.  Does that mean that I can't install Mambo when default is utf-8?&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>I got this error when I install Mambo with utf-8 as default in PHPMyAdmin.  Does that mean that I can&#8217;t install Mambo when default is utf-8?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
