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

goose2000’s picture

I 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.

goose2000’s picture

MySQL 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.

smw’s picture

Priority: Normal » Critical

Yep, 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?

mlncn’s picture

Assigned: Unassigned » mlncn

Hey, 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.

mlncn’s picture

If the original posters are still there, do you know what version of MySQL you are using? Maybe I put MySQL5-only syntax in there.

z.stolar’s picture

Title: bad install » SQL error on installation

I'm getting this error:

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 /var/www/projects/bpn/includes/database.mysql.inc on line 172.

I'm using MySQL 5.0.22

z.stolar’s picture

I think the INDEX keyword is misplaced.
Have you tried the following:

<?php
db_query("CREATE TABLE {relativity_access} ( 
          nid int(10) unsigned NOT NULL default '0',
          uid int(10) unsigned NOT NULL default '0',
          KEY (uid),
        )");
?>

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 ";")

mlncn’s picture

Status: Active » Fixed

Release 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:

If you have difficulty uninstalling a previous version, replace with this one first (but still do uninstall and then reinstall).

Sorry again about the rocky start, it should be usable now.

Anonymous’s picture

Status: Fixed » Closed (fixed)