|
|
| Author |
Message |
redtomato Beginner
Joined: 08 Dec 2005 Posts: 2
|
Posted: Thu Dec 08, 2005 5:44 pm Post subject: installation issue: mysql table creation syntax error |
|
|
i've compiled and installed netmrg correctly. but table creation makes a syntax error (one of the field name seems to be a reserved word in MySQL5): is there a workaround ? --> i don't want to downgrade my db!
Error
SQL query:
CREATE TABLE conditions(
id int( 11 ) NOT NULL AUTO_INCREMENT ,
event_id int( 11 ) NOT NULL default '0',
value bigint( 20 ) NOT NULL default '0',
condition smallint( 6 ) NOT NULL default '0',
logic_condition smallint( 6 ) NOT NULL default '0',
value_type smallint( 6 ) NOT NULL default '0',
PRIMARY KEY ( id ) ,
KEY event_id( event_id )
) TYPE = MYISAM ;
MySQL said: Documentation
#1064 - 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 '"condition" smallint(6) NOT NULL default '0',
logic_condition smallint(6) NOT' at line 5 |
|
| Back to top |
|
 |
redtomato Beginner
Joined: 08 Dec 2005 Posts: 2
|
Posted: Thu Dec 08, 2005 5:56 pm Post subject: workaround |
|
|
i've found a workaround:
in the file "share/netmrg.mysql", you have to add :
SET sql_mode='ANSI_QUOTES';
and then, add quotes to :
"condition" smallint(6) NOT NULL default '0', |
|
| Back to top |
|
 |
silfreed Site Admin
Joined: 19 Jan 2003 Posts: 394 Location: Shippensburg, PA, USA
|
Posted: Thu Dec 08, 2005 6:39 pm Post subject: |
|
|
You can also put backticks around the table name (`condition`).
I'm afraid it might become a problem in the gatherer and php scripts also; you might want to go through those and do the same thing (I recommend the backticks).
You might also want to report this as a bug in our bugs database: http://bugs.netmrg.net
-Doug |
|
| Back to top |
|
 |
radkon Beginner
Joined: 29 Jan 2006 Posts: 2
|
Posted: Sun Jan 29, 2006 8:10 pm Post subject: |
|
|
Thanks for this fix, I had been struggling to figure this out for a day now and I am no MySQL expert.
Thanks again |
|
| Back to top |
|
 |
|