marig345 / oauth-php

Automatically exported from code.google.com/p/oauth-php
MIT License
0 stars 0 forks source link

Error installing MYSQL database #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run "install.php" from the mysql folder

What is the expected output? What do you see instead?
Get "Error 1071: Specified key was too long; max key length is 1024 bytes"

What version of the product are you using? On what operating system?
MySQL 4.1.25

The issue is somewhere within the consumer side database (I tried CREATE 
statement by CREATE statement, but don't know MySQL well enough to see what the 
issue might be...)

Original issue reported on code.google.com by nzia...@gmail.com on 28 Nov 2010 at 12:48

GoogleCodeExporter commented 9 years ago
Discovery 

Original comment by m...@landwin.com.tw on 1 Dec 2010 at 7:25

GoogleCodeExporter commented 9 years ago
MySQL 4 needs shorter keys: http://bugs.mysql.com/bug.php?id=4541

I think the problem must be on the keys referencing ocr_server_uri in TABLE 
oauth_consumer_registry. I don't have a mysql 4 here to test (you should 
upgrade, but I know that upgrading is not always easy), but if you can tell me 
which create table statements work and which ones don't it will be easier to 
discover which keys are being problematic.

Three quick fixes: 

1) use latin1 instead of utf8. If you are sure that you won't use anything but 
ASCII or latin characters, this would work.
2) Reduce the fields (from 255 to 196, for example). May five you problems with 
long URIs, but they are not very common.
3) reduce the key sizes. This may lead to some clashes with long URIs as well.

Original comment by brunobg%...@gtempaccount.com on 1 Dec 2010 at 2:09

GoogleCodeExporter commented 9 years ago

Original comment by brunobg%...@gtempaccount.com on 6 Jan 2011 at 6:11