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 'update tinyint(3) unsigned NOT NULL default '0', delete tinyint(3) unsi' at line 5 query: CREATE TABLE simple_access_node ( nid int(10) unsigned NOT NULL default '0', gid int(10) unsigned NOT NULL default '0', view tinyint(3) unsigned NOT NULL default '0', update tinyint(3) unsigned NOT NULL default '0', delete tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (nid) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */; in /home/nynjtc/public_html/darlingtonschoolhouse/includes/database.mysql.inc on line 172.

Comments

ramsamba’s picture

I'm also getting some kind of sql 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 'update tinyint(3) unsigned NOT NULL default

'0', delete tinyint(3) unsig' at line 5 query: CREATE TABLE simple_access_node ( nid int(10) unsigned

NOT NULL default '0', gid int(10) unsigned NOT NULL default '0', view tinyint(3) unsigned NOT NULL

default '0', update tinyint(3) unsigned NOT NULL default '0', delete tinyint(3) unsigned NOT NULL

default '0', PRIMARY KEY (nid) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */; in

/home/mysite/public_html/includes/database.mysql.inc on line 172.
* user warning: Table 'mysite_drpl3.simple_access_node' doesn't exist query: SELECT na.gid,

na.view, na.update, na.delete FROM simple_access_node na WHERE na.nid = 29 in

/home/mysite/public_html/includes/database.mysql.inc on line 172.

The MySQL version is: 4.1.22-standard

davemybes’s picture

StatusFileSize
new1.18 KB

It seems like it has to do with the use of the table names view, update, delete. If you change those to sview, supdate, & sdelete, the table gets created with no problems.

I have created a patch that renames the tables to sview, supdate & sdelete for the initial install, and then renames the columns to view, update & delete once created. Bit of a cheat, I know, but its simpler than editing the module and renaming each column name (although that's what will probably have to happen).

darumaki’s picture

even with the patch the errors still appear

davemybes’s picture

First uninstall the module, then apply the patch. Before enabling the module again, go to your database and look for the system table. Browse through the list and find qad.module. Delete this line. Now re-enable the module and the errors should be gone. if you're not comfortable with editing the database directly (or don't have access to do that), then just try uninstalling and re-enabling. It might work.

dww’s picture

Assigned: Unassigned » dww
Status: Active » Needs review
StatusFileSize
new1.03 KB

I can confirm the bug with MySQL 5.0.x. Here's an even simpler patch that seems to work for new installs. Just escape the MySQL keywords directly in the CREATE TABLE statement.

gordon’s picture

Status: Needs review » Fixed

Thanks fixed in 5.x-dev.

New version coming soon

dww’s picture

Version: 5.x-1.0 » 5.x-1.x-dev
Status: Fixed » Patch (to be ported)

You only committed the fix to HEAD, not DRUPAL-5. Please commit these fixes to both branches, DRUPAL-5 is used for all 5.x-1.* bug fixes, and HEAD is used for whatever you're doing next (D6 porting or new features for 5.x-2.* -- you decide). Thanks!

davemybes’s picture

So much more elegant than my clunker :) Thanks.

darumaki’s picture

the new update appears to install ok now, but when you restrict a page instead of an access denied message you get a page not found is this normal ?

gordon’s picture

Status: Patch (to be ported) » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

  • Commit e71b05f on 5.x-2.x, 6.x-2.x, master, 8.x-3.x by gordon:
    * #197561 - Fix up SQL error with install