Closed Bug 330599 Opened 19 years ago Closed 18 years ago

[MySQL 5.1] MySQL does not support "TYPE" as part of CREATE TABLE

Categories

(Bugzilla :: Installation & Upgrading, defect)

2.20.1
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: junk, Assigned: mkanat)

References

Details

(Whiteboard: [fixed by blocker])

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Build Identifier: Bugzilla v2.20.1 Mysql 5.1.7 has depricated the DDL statment of 'TYPE=' for declaring a Table Engine of the SQL "TYPE=MyISAM" in preference for 'ENGINE=MyISAM'. This issue arises when executing checksetup.pl on a fresh install of Mysql 5.1.7 and the bugzilla schema has not yet been created. Reproducible: Always Steps to Reproduce: 1.Install Mysql 5.1.7 (recently moved to beta from Alpha) 2.Install Perl & necessary modules 3.Install Bugzilla with checksetup.pl Actual Results: Building Schema object from database... Adding new table bz_schema ... DBD::mysql::db do failed: 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 'TYPE = MYISAM' at line 4 at Bugzilla/DB.pm line 509 Bugzilla::DB::_bz_add_table_raw('Bugzilla::DB::Mysql=HASH(0x2633d7c)', 'bz_schema') called at Bugzilla/DB.pm line 822 Bugzilla::DB::_bz_init_schema_storage('Bugzilla::DB::Mysql=HASH(0x2633d7c)') called at Bugzilla/DB.pm line 326 Bugzilla::DB::bz_setup_database('Bugzilla::DB::Mysql=HASH(0x2633d7c)') called at Bugzilla/DB/Mysql.pm line 427 Bugzilla::DB::Mysql::bz_setup_database('Bugzilla::DB::Mysql=HASH(0x2633d7c)') called at C:\Devware\bugzilla-2.20.1\checksetup.pl line 1583 If memory serves me correct, the 'TYPE=' for engine declaration of a table in Mysql has been deprecated since mysql v4.x... in mysql v5.1.6 the backwards compatibility has finally been removed.
Okay. If MySQL 4.0 supports ENGINE, we can modify the code to use that instead, for Bugzilla 2.22 and up. Otherwise we can just do a version check inside of Bugzilla::DB::Mysql itself (which is where the code is).
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.22
Version: unspecified → 2.20.1
Assignee: installation → mkanat
That solutions sounds good. 'ENGINE=MyISAM' is supported back in MySQL v4. If you can, please post a temporary solution so that I may be able to continue installing bugzilla before the 2.22 release is available (which could be weeks/months?).
I finally just realized that you're using MySQL 5.1, which we don't support at all, on any version of Bugzilla. We only support released versions of MySQL, for the most part. You're likely to run into many problems. ENGINE was only added in MySQL 4.0.18. Right now we only require MySQL 4.0.14, and I don't want to increase the version requirement purely to support an unreleased version of MySQL. So I'll confirm this bug, but I can't guarantee it will be fixed any time soon. To fix it yourself, find "TYPE" in Bugzilla/DB/Schema/Mysql.pm and change it to "ENGINE."
Severity: major → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: checksetup.pl - mysql 5.1.7 incompatibility when creating schema - TYPE=MYISAM → [MySQL 5.1] MySQL does not support "TYPE" as part of CREATE TABLE
Target Milestone: Bugzilla 2.22 → ---
The change suggested by Max Kanat-Alexander worked successfully. Thank You! Find 'TYPE = ' in Bugzilla\DB\Schema\Mysql.pm replace with 'ENGINE = '
I think many with me would have appreciated a comment regarding this problem with MySQL5 on the installation for windows page: http://www.bugzilla.org/docs/win32install.html It is not entirely intuitive. Who can edit it? I can't.
Minimum MySQL version is 4.1.2 on HEAD. From the comments this change would require MySQL 4.0.18. Requesting blocking 3.0 as it might be nice to fix this for 3.0.
Flags: blocking3.0?
Yes. In fact, it's already been fixed in HEAD by bug 304550.
Status: NEW → RESOLVED
Closed: 18 years ago
Depends on: 304550
Flags: blocking3.0? → blocking3.0+
Resolution: --- → FIXED
Whiteboard: [fixed by blocker]
Target Milestone: --- → Bugzilla 3.0
You need to log in before you can comment on or make changes to this bug.