Upon copying the module folder over and activating the module check box and saving I'm getting this error:
(MySQL 5.0 , PHP 5.1)
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INDEX, uid int(10) unsigned NOT NULL default '0' )' at line 2 query: CREATE TABLE relativity_access ( nid int(10) unsigned NOT NULL default '0' INDEX, uid int(10) unsigned NOT NULL default '0' ); in C:\Inetpub\wwwroot\drupal\includes\database.mysql.inc on line 172.
* user warning: Table 'drupal5.relativity_access' doesn't exist query: SELECT * FROM relativity_access WHERE nid = 146 in C:\Inetpub\wwwroot\drupal\includes\database.mysql.inc on line 172.
* user warning: Table 'drupal5.relativity_access' doesn't exist query: SELECT * FROM relativity_access WHERE nid = 147 in C:\Inetpub\wwwroot\drupal\includes\database.mysql.inc on line 172.
* user warning: Table 'drupal5.relativity_access' doesn't exist query: SELECT * FROM relativity_access WHERE nid = 148 in C:\Inetpub\wwwroot\drupal\includes\database.mysql.inc on line 172.
* user warning: Table 'drupal5.relativity_access' doesn't exist query: SELECT * FROM relativity_access WHERE nid = 149 in C:\Inetpub\wwwroot\drupal\includes\database.mysql.inc on line 172.
* user warning: Table 'drupal5.relativity_access' doesn't exist query: SELECT * FROM relativity_access WHERE nid = 150 in C:\Inetpub\wwwroot\drupal\includes\database.mysql.inc on line 172.
* user warning: Table 'drupal5.relativity_access' doesn't exist query: SELECT * FROM relativity_access WHERE nid = 151 in C:\Inetpub\wwwroot\drupal\includes\database.mysql.inc on line 172.
* user warning: Table 'drupal5.relativity_access' doesn't exist query: SELECT * FROM relativity_access WHERE nid = 152 in C:\Inetpub\wwwroot\drupal\includes\database.mysql.inc on line 172.
Comments
Comment #1
goose2000 commentedI have removed the section 'INDEX' from this table create command and it follows through now, installs. BUT...
Does INDEX work in MySQL5 ? I know what key is but what does index do?
Sorry for the dumb question.
Comment #2
goose2000 commentedMySQL 5 manual :
"With col_name(N) syntax in an index specification, you can create an index that uses only the first N characters of a string column. Indexing only a prefix of column values in this way can make the index file much smaller. When you index a BLOB or TEXT column, you must specify a prefix length for the index. For example:
CREATE TABLE test (blob_col BLOB, INDEX(blob_col(10)));"
So, looks like it is wrapped in (), I can't get it to work though. Anyway seems to be a performance thing, not function.
Comment #3
smw commentedYep, I get the same errors,
Does anyone know the SQL to create the tables that are missing here?
Or how to resolve this error, I have performed the update.php and the uninstall / reinstall a number of times now.
Why does this happen?
Comment #4
mlncn commentedHey, sorry for being a horribly inattentive module maintainer. I thought this was set to e-mail me. I'll be getting to work on this.
Comment #5
mlncn commentedIf the original posters are still there, do you know what version of MySQL you are using? Maybe I put MySQL5-only syntax in there.
Comment #6
z.stolar commentedI'm getting this error:
I'm using MySQL 5.0.22
Comment #7
z.stolar commentedI think the INDEX keyword is misplaced.
Have you tried the following:
It worked for me. BTW, you had an unnecessary ";" at the end of the query (when using db_query, you don't need to terminate your queries with ";")
Comment #8
mlncn commentedRelease 5.x-1.3 should fix this-- and some other important things.
If you installed the module and the table creation errors have made it difficult to uninstall, this 1.3 version of the module will help:
Sorry again about the rocky start, it should be usable now.
Comment #9
(not verified) commented