Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-15-2007, 11:24 PM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default MySQL Error: ENGINE = MyISAM invalid SQL?

When trying to install a few hacks, including QuoteIt, Radio Stations, and Multiple Login Detector, I get the following error:

Quote:
MySQL Error : 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 'ENGINE=MyISAM' at line 15
Error Number : 1064
How can I fix/bypass/etc this? It's preventing me from installing hacks that I want, and likely will affect more in the future. I searched the site, but couldn't find any other instances of this problem.
Reply With Quote
  #2  
Old 08-15-2007, 11:33 PM
Eikinskjaldi's Avatar
Eikinskjaldi Eikinskjaldi is offline
 
Join Date: Feb 2006
Location: Hell, never looked better
Posts: 572
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a mysql version incompatibility.

Mysql 5 adds the engine definition to the create table syntax. Mysql 4 (and perhaps 4.1, I am not sure) does not recognise it.

2 solutions
1) upgrade your mysql
2) edit the plugin to remove the engine designation.
Reply With Quote
  #3  
Old 08-15-2007, 11:48 PM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Eikinskjaldi View Post
This is a mysql version incompatibility.


Mysql 5 adds the engine definition to the create table syntax. Mysql 4 (and perhaps 4.1, I am not sure) does not recognise it.

2 solutions
1) upgrade your mysql
2) edit the plugin to remove the engine designation.
Thanks for the suggestions.

Does removing the engine designation have any effect on the performance of the hack, and/or are there any theoretical reprecussions?
Reply With Quote
  #4  
Old 08-16-2007, 12:23 AM
Eikinskjaldi's Avatar
Eikinskjaldi Eikinskjaldi is offline
 
Join Date: Feb 2006
Location: Hell, never looked better
Posts: 572
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Megareus Rex View Post
Thanks for the suggestions.

Does removing the engine designation have any effect on the performance of the hack, and/or are there any theoretical reprecussions?
The only theoretical repercussion is if a particular table in the hack is not using the MYISAM storage engine, regardless, the likely effect on performance is minimal. It is possible that the hack has defined an innodb table (quite why escapes me) or a memory table (which is an efficient way of storing data that does not need permanent storage, such as session details). In both cases MYIASM tables will also work.

From the mysql reference manual:
ENGINE was added in MySQL 4.0.18 (for 4.0) and 4.1.2 (for 4.1).

This means you are using a *really old and probably unsupported* version of mysql
Reply With Quote
  #5  
Old 08-16-2007, 02:43 AM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, if you look at the whole error, it is the collation that is causing the error. Language collations are in newer versions and you cannot restore with that information. You need to make the backup with compatibility for the older version.
Reply With Quote
  #6  
Old 08-16-2007, 05:40 AM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Wayne Luke View Post
Actually, if you look at the whole error, it is the collation that is causing the error. Language collations are in newer versions and you cannot restore with that information. You need to make the backup with compatibility for the older version.
What does that mean, exactly? Is there anything I could edit in the hacks to still have them install? My MySQL version is 4.0.16, btw.

I'm just trying to understand the problem. The MySQL is controlled by the host I have, so I can't really easily upgrade it, though moving to a new host with a newer version is always possible (I've been wanting to move anyways).

Thanks in advance for any help or suggestions.
Reply With Quote
  #7  
Old 08-16-2007, 05:53 AM
Eikinskjaldi's Avatar
Eikinskjaldi Eikinskjaldi is offline
 
Join Date: Feb 2006
Location: Hell, never looked better
Posts: 572
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Megareus Rex View Post
What does that mean, exactly? Is there anything I could edit in the hacks to still have them install? My MySQL version is 4.0.16, btw.

I'm just trying to understand the problem. The MySQL is controlled by the host I have, so I can't really easily upgrade it, though moving to a new host with a newer version is always possible (I've been wanting to move anyways).

Thanks in advance for any help or suggestions.
I have no idea where Wayne is getting this from, unless there is some hidden extra error message I cannot see. Your mysql version is certainly incompatible with the engine declaration.

A character set defines what actual characters are represented in your strings, so if you were writing in French you would want a character set that supported accents over vowels. A collation determines how the members of the set are compared, for example does "a" come before "A".

Chances are you could delete any reference to these in the create table syntax, and not cause a problem. Obviously, I cannot guarantee this. Were it me, I'd be moving hosts. 4.0 is a poor choice of database for today. It's not even supported anymore.
Reply With Quote
  #8  
Old 08-16-2007, 01:51 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In newer versions of MySQL the export of a table would be:
Code:
CREATE TABLE `vb_access` (
  `userid` int(10) unsigned NOT NULL default '0',
  `forumid` smallint(5) unsigned NOT NULL default '0',
  `accessmask` smallint(5) unsigned NOT NULL default '0',
  PRIMARY KEY  (`userid`,`forumid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
For MySQL 4.0 compatibility it would be:
Code:
CREATE TABLE `vb_access` (
  `userid` int(10) unsigned NOT NULL default '0',
  `forumid` smallint(5) unsigned NOT NULL default '0',
  `accessmask` smallint(5) unsigned NOT NULL default '0',
  PRIMARY KEY  (`userid`,`forumid`)
) TYPE=InnoDB;
Just export the table with the --compat MYSQL40 flag as show here:
http://www.vbulletin.com/docs/html/m...servers_backup

Or just remove everything after the closing parenthesis for each table declaration. If it isn't specified than MySQL will use its defaults.
Reply With Quote
  #9  
Old 08-16-2007, 09:23 PM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Wayne Luke View Post
In newer versions of MySQL the export of a table would be:
Code:
CREATE TABLE `vb_access` (
  `userid` int(10) unsigned NOT NULL default '0',
  `forumid` smallint(5) unsigned NOT NULL default '0',
  `accessmask` smallint(5) unsigned NOT NULL default '0',
  PRIMARY KEY  (`userid`,`forumid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
For MySQL 4.0 compatibility it would be:
Code:
CREATE TABLE `vb_access` (
  `userid` int(10) unsigned NOT NULL default '0',
  `forumid` smallint(5) unsigned NOT NULL default '0',
  `accessmask` smallint(5) unsigned NOT NULL default '0',
  PRIMARY KEY  (`userid`,`forumid`)
) TYPE=InnoDB;
Just export the table with the --compat MYSQL40 flag as show here:
http://www.vbulletin.com/docs/html/m...servers_backup

Or just remove everything after the closing parenthesis for each table declaration. If it isn't specified than MySQL will use its defaults.
Ah, ok, I'll try that. Thanks for the help so far
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:59 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04254 seconds
  • Memory Usage 2,261KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete