[Owncloud] MySQL index issue

Andreas Schneider asn at cryptomilk.org
Mon Sep 24 16:14:11 UTC 2012


On Monday 24 September 2012 18:02:06 Andreas Schneider wrote:
> On Monday 24 September 2012 18:00:16 Andreas Schneider wrote:
> > Hello,
> > 
> > I get the following error:
> > 
> > {"app":"core","message":"Failed to update database structure (MDB2 Error:
> > unknown error, _doQuery: [Error message: Could not execute
> > statement]\n[Last executed query: CREATE INDEX
> > `appconfig_appid_key_index` ON `cld_appconfig` (`appid`,
> > `configkey`)]\n[Native code: 1071]\n[Native message: Specified key was
> > too long; max key length is 1000
> > bytes]\n)","level":4,"time":1348502048}
> > 
> > The reason for this is cause appid and configkey are varchar(255) and you
> > can't index them cause they are two big.
> > 
> > See http://bugs.mysql.com/bug.php?id=4541
> > 
> > Why needs the appid to be such a big key? Same for the configkey ...
> 
> Same for the preferences table with userid, appid and configkey and for sure
> others.

In one table the userid is 200 then in the next 100 and 255. This will 
probably not work out.


Please choose sane values. Suggestions:

userid 32 chars (who really chooses a username longer than that?)
appid 32 chars (my_super_duper_mega_cool_app_which_does_nothing is for
                sure not a good choice.)
configkey 64 chars (maybe more)



	-- andreas

-- 
Andreas Schneider                   GPG-ID: F33E3FC6
www.cryptomilk.org                asn at cryptomilk.org




More information about the Owncloud mailing list