Bug #42294 errors in the upgrade process while converting the database to UTF-8

Submitted: 23 Jan 2009 9:51 Modified: 26 Jan 2009 7:55
Reporter: Andrejs Dubovskis Email Updates:
Status: Closed Impact on me:
None 
Category:Eventum Severity:S3 (Non-critical)
Version:2.2 OS:Any
Assigned to: Bryan Alsdorf CPU Architecture:Any

[23 Jan 2009 9:51] Andrejs Dubovskis
Description:
While calling misc/upgrade/v2.1.1_to_v2.2/convert-utf8.php

Performing database changes (72) queries DB Error: syntax error:
ALTER TABLE group CONVERT TO CHARACTER SET utf8 [nativecode=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 'group CONVERT TO CHARACTER SET utf8'
at line 1]

Another error is in the misc/upgrade/v2.1.1_to_v2.2/fix-charset.php script
The table INFORMATION_SCHEMA.COLUMNS has no TABLE_TYPE column.

How to repeat:
Call the convert-utf8.php script when the table group has any non-utf8 collation

Suggested fix:
'group' is the mysql reserved word. Should be prefixed with a database name.
[23 Jan 2009 14:29] Valeriy Kravchuk
Thank you for a bug report. Verified just as described by code review. 

One should better quote table name with backtics in the first case and join to the TABLES table to get TABLE_TYPE column in the second case.
[26 Jan 2009 7:55] Bryan Alsdorf
Thanks for the report, this is now fixed.

Not sure if we will release a new tarball or not, but the file is here:
http://svn.mysql.com/fisheye/browse/eventum-gpl/eventum/misc/upgrade/v2.1.1_to_v2.2/fix-ch...
[9 Feb 2009 22:12] Michael Reeves
Bryan,

I added the changes you made in fix-charset.php rev. 3810.  However, when I ran it my server just kept spinning until I removed the backticks arount $table on line 70.  After those were removed, the script executed fine, with:
 
#!/usr/bin/php Performing database changes (16) queries Done!
[10 Feb 2009 7:06] Bryan Alsdorf
When the server was spinning did you happen to run show processlist? Depending on the size of your tables converting them could take some time.
[21 Apr 2009 18:56] Michael Reeves
Sorry, I did not.  I can run through it again on my testing machine if you need me to.
[21 Apr 2009 21:56] Michael Reeves
Bryan, 

You can strike my earlier comment.  It does in fact complete after a long time.  I used the file version from the 1/29/09 build to get it to work.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.