This sounds like a difference between MySQL 5.1 and MySQL 5.5 as well. Karl
On Wed, Jul 3, 2013 at 10:27 AM, Ahmet Arslan <[email protected]> wrote: > > > Hi, > > Here is the page I used for workaround. > > > https://confluence.atlassian.com/display/FISHKB/MySQL+Database+Migration+fails+with+Specified+key+was+too+long+max+key+length+is+1000+bytes > > > It says this is a MySQL bug related to MyISAM > http://bugs.mysql.com/bug.php?id=4541 > > I think "if you get this error, use innodb engine" kind of documentation > would be out best bet. > > Ahmet > > ________________________________ > From: Ahmet Arslan <[email protected]> > To: "[email protected]" <[email protected]> > Sent: Wednesday, July 3, 2013 5:01 PM > Subject: Re: MySQL exception "Specified key was too long; max key length > is 1000 bytes" > > > Hi, > > I am running : MySQL Server version: 5.1.69-0ubuntu0.10.04.1 (Ubuntu) > > It seems that we cannot specify Engine while creating database. [1] > > Committed typo fix in r1499405 > > [1] > http://stackoverflow.com/questions/4755854/create-innodb-database-in-mysql > > ________________________________ > From: Karl Wright <[email protected]> > To: dev <[email protected]>; Ahmet Arslan <[email protected]> > Sent: Wednesday, July 3, 2013 4:27 PM > Subject: Re: MySQL exception "Specified key was too long; max key length > is 1000 bytes" > > > Hi Ahmet, > > First, I am curious what version of MySQL you are using. The schema for > IntrinsicLink has not changed in a long time and I have been running tests > on it quite consistently. I'm using a 5.5 variant (don't have access to > that right now, but I can look it up Sunday.) > > Second, for small typos, just commit a fix. > > Third, the preferred way of fixing the MySQL problem you mention is none of > the above. Is there a way to set INNODB by default for a database? If so > it should be set in createUserAndDatabase() in the DBInterfaceMySQL class. > If this doesn't work, (2) is the best alternative. > > Karl > > > > On Wed, Jul 3, 2013 at 8:50 AM, Ahmet Arslan <[email protected]> wrote: > > > Hi, > > > > When installing ManfoldCF with MySQL database, initialize.sh scripts > fails > > with the following exception. > > > > I found out that MySQL tables should be InnoDB to overcome this > > constraint. For a workaround I changed the storage engine used by default > > via > > "set GLOBAL storage_engine='InnoDb';" > > > > After this change, initialize.sh successfully initialized database and > > registered all connectors. > > > > What is the preferred way in this scenario > > > > 1) Document (Configuring a MySQL database) to execute "set GLOBAL > > storage_engine='InnoDb';" before initialize.sh when using MySQL > > > > 2) > > Modify org.apache.manifoldcf.core.database.DBInterfaceMySQL#performCreate > > method to specify "ENGINE=InnoDB;" when creating table(s). > > > > Also I found a small typo (datastyle => datestyle) at how to build and > > deploy page. What is the preferred way to correct these kind of small > > typos? Direct commit? Jira? > > > > Thanks, > > Ahmet > > > > org.apache.manifoldcf.core.interfaces.ManifoldCFException: Database > > exception: SQLException doing query (42000): Specified key was too long; > > max key length is 1000 bytes > > at > > > org.apache.manifoldcf.core.database.Database.executeViaThread(Database.java:717) > > at > > > org.apache.manifoldcf.core.database.Database.executeUncachedQuery(Database.java:745) > > at > > > org.apache.manifoldcf.core.database.Database$QueryCacheExecutor.create(Database.java:1430) > > at > > > org.apache.manifoldcf.core.cachemanager.CacheManager.findObjectsAndExecute(CacheManager.java:144) > > at > > > org.apache.manifoldcf.core.database.Database.executeQuery(Database.java:186) > > at > > > org.apache.manifoldcf.core.database.DBInterfaceMySQL.performModification(DBInterfaceMySQL.java:690) > > at > > > org.apache.manifoldcf.core.database.DBInterfaceMySQL.performAddIndex(DBInterfaceMySQL.java:509) > > at > > > org.apache.manifoldcf.core.database.BaseTable.performAddIndex(BaseTable.java:139) > > at > > > org.apache.manifoldcf.crawler.jobs.IntrinsicLink.install(IntrinsicLink.java:140) > > at org.apache.manifoldcf.crawler.jobs.HopCount.install(HopCount.java:190) > > at > > org.apache.manifoldcf.crawler.jobs.JobManager.install(JobManager.java:79) > > at > > > org.apache.manifoldcf.crawler.system.ManifoldCF.installSystemTables(ManifoldCF.java:506) > > at > > > org.apache.manifoldcf.crawler.system.CrawlerAgent.install(CrawlerAgent.java:48) > > at > > > org.apache.manifoldcf.agents.agentmanager.AgentManager.registerAgent(AgentManager.java:146) > > at > > > org.apache.manifoldcf.crawler.system.ManifoldCF.registerThisAgent(ManifoldCF.java:176) > > at > > > org.apache.manifoldcf.crawler.InitializeAndRegister.doExecute(InitializeAndRegister.java:41) > > at > > > org.apache.manifoldcf.crawler.InitializeAndRegister.main(InitializeAndRegister.java:60) > > Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: > > Specified key was too long; max key length is 1000 bytes > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > > at > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > > at > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) > > at com.mysql.jdbc.Util.getInstance(Util.java:381) > > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1031) > > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957) > > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376) > > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308) > > at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1837) > > at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1961) > > at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2537) > > at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2466) > > at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:735) > > at > org.apache.manifoldcf.core.database.Database.execute(Database.java:836) > > at > > > org.apache.manifoldcf.core.database.Database$ExecuteQueryThread.run(Database.java:677) >
