Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Illegal mix of Collations when Reassinging Bug in Bugzilla 3.0

32 views
Skip to first unread message

Adam

unread,
May 17, 2007, 7:13:18 AM5/17/07
to
When i try to reassign bugs in Bugzilla 3.0 i received the error message
below. Iv just upgraded from Bugzilla 2.0 to Bugzilla 3.0 and had no
problems before. Im guessing its something to do with the encoding types of
the old database and it hasnt been converted proberly or something like
that. Iv tried using the recode.pl script and it works fine with no errors.
But i still receieved this;

Software error:

DBD::mysql::db do failed: Illegal mix of collations
(utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation
'case' at E:\Web\bugzilla\process_bug.cgi line 1689

For help, please send mail to this site's webmaster, giving this error
message and the time and date of the error.
[Thu May 17 12:06:20 2007] process_bug.cgi: DBD::mysql::db do failed:
Illegal mix of collations (utf8_general_ci,COERCIBLE) and
(latin1_swedish_ci,IMPLICIT) for operation 'case' at
E:\Web\bugzilla\process_bug.cgi line 1689


Any ideas / suggestions / fixes will be greatly appreiated!

Adam

unread,
May 17, 2007, 7:23:45 AM5/17/07
to
I've just disaplayed the query to see why its going wrong, and it doesnt
seem to look correct;

UPDATE bugs SET
rep_platform = ?,
priority = ?,
bug_severity = ?,
bug_file_loc = ?,
short_desc = ?,
version = ?,
op_sys = ?,
cf_current_version = ?,
product_id = ?,
component_id = ?,
bug_status = CASE WHEN bug_status IN('NEW', 'REOPENED', 'ASSIGNED',
'UNCONFIRMED') THEN (CASE WHEN everconfirmed = 1 THEN 'NEW' ELSE
'UNCONFIRMED' END) ELSE bug_status END,
assigned_to = ?,
estimated_time = ?,
remaining_time = ?,
deadline = NULL WHERE bug_id = ?" (perhaps you forgot to load "UPDATE
bugs SET
rep_platform = ?,
priority = ?,
bug_severity = ?,
bug_file_loc = ?,
short_desc = ?,
version = ?,
op_sys = ?,
cf_current_version = ?,
product_id = ?,
component_id = ?,
bug_status = CASE WHEN bug_status IN('NEW', 'REOPENED', 'ASSIGNED',
'UNCONFIRMED') THEN (CASE WHEN everconfirmed = 1 THEN 'NEW' ELSE
'UNCONFIRMED' END) ELSE bug_status END,
assigned_to = ?,
estimated_time = ?,
remaining_time = ?,
deadline = NULL WHERE bug_id = ?"?) at E:\Web\bugzilla\process_bug.cgi
line 1688.

Max Kanat-Alexander

unread,
May 17, 2007, 1:11:26 PM5/17/07
to support-...@lists.mozilla.org
On Thu, 17 May 2007 12:13:18 +0100 "Adam" <ad...@84degrees.com> wrote:
> DBD::mysql::db do failed: Illegal mix of collations

You need to run checksetup.pl one more time. Just trust me. I
wrote it. :-) That's what you need to do. :-)

-Max
--
http://www.everythingsolved.com/
Competent, Friendly Bugzilla Services. And Everything Else, too.

Roy

unread,
May 21, 2007, 1:35:19 PM5/21/07
to

"Max Kanat-Alexander" <mka...@bugzilla.org> wrote in message
news:mailman.995.1179421910...@lists.mozilla.org...

I re-ran checksetup.pl, per suggestion above, and am still getting this
error message. Any other suggestions??

-Roy


Max Kanat-Alexander

unread,
May 21, 2007, 1:51:42 PM5/21/07
to support-...@lists.mozilla.org
On Mon, 21 May 2007 12:35:19 -0500 "Roy" <richmo...@cimcor.com>
wrote:

> I re-ran checksetup.pl, per suggestion above, and am still getting
> this error message. Any other suggestions??

Did it convert your database?

Are you perhaps running a utf-8 database without having the
utf8 parameter on in Bugzilla?

Usually the problem is the other way--using utf8 data with
a non-utf8 database, and running checksetup.pl fixes that. But maybe
it's the other way around for you?

Roy

unread,
May 21, 2007, 3:15:00 PM5/21/07
to

"Max Kanat-Alexander" <mka...@bugzilla.org> wrote in message
news:mailman.1213.1179769930...@lists.mozilla.org...

According to mysql, I am using UTF-8:

mysql> status;
--------------
mysql Ver 14.12 Distrib 5.0.33, for pc-linux-gnu (i686) using readline 5.0

Connection id: 2
Current database: bugs
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.33 Source distribution
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /srv/mysql/mysql.sock
Uptime: 2 min 28 sec

Threads: 1 Questions: 63 Slow queries: 0 Opens: 66 Flush tables: 1 Open
tables: 60 Queries per second avg: 0.426
--------------


And I have checked the parameters in bugzilla: UTF-8 is set to on.

When I set this up, I performed a clean bugzilla install, backed-up the
mysql database, and then restored it into the clean install. Could this be
the issue??

-Roy


ad...@84degrees.com

unread,
May 30, 2007, 6:22:04 AM5/30/07
to
On May 21, 8:15 pm, "Roy" <richmond....@cimcor.com> wrote:
> "Max Kanat-Alexander" <mka...@bugzilla.org> wrote in message
>
> news:mailman.1213.1179769930...@lists.mozilla.org...
>
>
>
> > On Mon, 21 May 2007 12:35:19 -0500 "Roy" <richmond....@cimcor.com>

i reran the checksetup.pl and i still receive the error. iv the same
thing as roy, transfered from an older bugzilla installation. i have
UTF-8 support turned on, if i try to turn it off in the bugzilla
settings i receive this error;

The new value for utf8 is invalid: You cannot disable UTF-8 support,
because your MySQL database is encoded in UTF-8.

I've ran recode.pl a few times but it doesnt seem to be doing
anything, and im not sure if its because im specifying something wrong
or its just my database.


All the help is appreciated and sorry i took awhile to reply!

ad...@84degrees.com

unread,
May 30, 2007, 6:32:05 AM5/30/07
to
iv managed to fix the problem!

heres a quick fix;

go to the params file in the data directory, look for 'utf8' => and
then change the value from 1 to 0 or from 0 to 1

This should solve your the problem!

ad

On May 21, 8:15 pm, "Roy" <richmond....@cimcor.com> wrote:

> "Max Kanat-Alexander" <mka...@bugzilla.org> wrote in message
>
> news:mailman.1213.1179769930...@lists.mozilla.org...
>
>
>

> > On Mon, 21 May 2007 12:35:19 -0500 "Roy" <richmond....@cimcor.com>

Max Kanat-Alexander

unread,
May 30, 2007, 5:11:12 PM5/30/07
to support-...@lists.mozilla.org
On 30 May 2007 03:22:04 -0700 ad...@84degrees.com wrote:
> The new value for utf8 is invalid: You cannot disable UTF-8 support,
> because your MySQL database is encoded in UTF-8.

Okay. Here's what you have to do.

1. Back up your DB.

2. Go into MySQL, and do:

ALTER DATABASE bugs CHARACTER SET latin1;

3. Re-run checksetup.pl

If you are missing any data after #3, then you should run
recode.pl again after #2.

Max Kanat-Alexander

unread,
May 30, 2007, 5:12:15 PM5/30/07
to support-...@lists.mozilla.org
On 30 May 2007 03:32:05 -0700 ad...@84degrees.com wrote:
> go to the params file in the data directory, look for 'utf8' => and
> then change the value from 1 to 0 or from 0 to 1
>
> This should solve your the problem!

And you absolutely should *not* do it. You could corrupt the
data in your database, particularly if any of it is already UTF-8.

alex.s...@gmail.com

unread,
Jun 12, 2007, 11:04:26 AM6/12/07
to

Did your database have any special characters in the name that could
interfere with a MySQL query? I was having this issue, apparently I
missed that the checksetup.pl had encountered an error when I was
upgrading my existing DB with the 3.0rc1 release. My database was
named "something-bugs", and the hyphen was causing an error in the
MySQL query performed in .\Bugzilla\DB\Mysql.pm on line 646:

$self->do("ALTER DATABASE $db_name CHARACTER SET utf8");

By changing the $db_name to be surrounded by `backticks` like so:

$self->do("ALTER DATABASE `$db_name` CHARACTER SET utf8");

You can then re-run checksetup.pl and have it succeed (if this was
your problem.)

xmirog

unread,
Jun 13, 2007, 11:57:19 AM6/13/07
to
I have changed the value of 'utf8' from 1 to 0 and it has worked for
me too !

My situation was a bit different, because my SQL data was already
written in Latin1 charset (the result of 'status' in MySQL shell was
'Latin1', not 'utf-8'). I had tried to solve it with recode.pl and
checksetup.pl but it didn't work, the special characters were all
wrong, so I tried as a last resort to change this 'utf8' value in
Bugzilla 'params' file and it works !

It is _VERY_ important that you make a backup of your MySQL data
before doing those kind of changes!!!

- Xavi

On May 30, 11:12 pm, Max Kanat-Alexander <mka...@bugzilla.org> wrote:


> On 30 May 2007 03:32:05 -0700 a...@84degrees.com wrote:
>
> > go to the params file in the data directory, look for 'utf8' => and
> > then change the value from 1 to 0 or from 0 to 1
>
> > This should solve your the problem!
>
> And you absolutely should *not* do it. You could corrupt the
> data in your database, particularly if any of it is already UTF-8.
>
> -Max

> --http://www.everythingsolved.com/

wsgl...@gmail.com

unread,
Jun 22, 2007, 12:24:27 PM6/22/07
to
I hit this error recently after a fresh install. Thank God google is
here to find the answers to all my problems!

I just re-ran checksetup.pl as Max recommended and it resolved my
issue. Given that he warns against changing the value of 'utf8' from
1 to 0 manually, I would suggest trying this option first.
--
Bill

java...@gmail.com

unread,
Jun 26, 2007, 2:17:48 PM6/26/07
to
> > DBD::mysql::db do failed:Illegalmixofcollations
>
> You need to run checksetup.pl one more time. Just trust me. I
> wrote it. :-) That's what you need to do. :-)
>
> -Max
> --http://www.everythingsolved.com/

I followed all the suggestions provided for by this thread and I am
still getting this error.

This was a clean install of Bugzilla 3.0, mySQL, and Perl, but it had
older Bugzilla data imported. The import had no problems until now.
MySQL is dedicated to Bugzilla, there are no other apps connecting to
it

Here are the particulars:
C:\bugzilla-3.0>perl checksetup.pl
* This is Bugzilla 3.0 on perl 5.8.8
* Running on Win2003 Build 3790
Checking for MySQL (v4.1.2) ok: found v5.0.41-community-nt

C:\bugzilla-3.0>ver
Microsoft Windows [Version 5.2.3790]

C:\bugzilla-3.0>perl --version
This is perl, v5.8.8 built for MSWin32-x86-multi-thread

mysql> status;
--------------
mysql Ver 14.12 Distrib 5.0.41, for Win32 (ia32)

Connection id: 9


Current database: bugs
Current user: root@localhost
SSL: Not in use

Using delimiter: ;
Server version: 5.0.41-community-nt MySQL Community Edition
(GPL)
Protocol version: 10
Connection: localhost via TCP/IP


Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8

TCP port: 3306

Max Kanat-Alexander

unread,
Jun 27, 2007, 1:17:33 AM6/27/07
to support-...@lists.mozilla.org
On Tue, 26 Jun 2007 11:17:48 -0700 java...@gmail.com wrote:
> Db characterset: utf8

In MySQL, do:

ALTER DATABASE SET CHARACTER SET = 'latin1';

And then re-run checksetup.

If you've always had the "utf8" parameter on, you don't need to
run recode.pl. Otherwise you may have to.

java...@gmail.com

unread,
Jun 27, 2007, 12:12:39 PM6/27/07
to
It finally worked - thank you very much Max.

> On Tue, 26 Jun 2007 11:17:48 -0700 javase...@gmail.com wrote:
> In MySQL, do:
> ALTER DATABASE SET CHARACTER SET = 'latin1';
> And then re-run checksetup.
>
> If you've always had the "utf8" parameter on, you don't need to
> run recode.pl. Otherwise you may have to.

murli

unread,
Jun 29, 2007, 10:12:04 AM6/29/07
to support-...@lists.mozilla.org

Hi Adam,
Thanks a lot,
It worked for me also.

Murli.

> _______________________________________________
> support-bugzilla mailing list
> support-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/support-bugzilla
> PLEASE put support-...@lists.mozilla.org in the To: field when you
> reply.
>
>

--
View this message in context: http://www.nabble.com/Illegal-mix-of-Collations-when-Reassinging-Bug-in-Bugzilla-3.0-tf3771353.html#a11360888
Sent from the Bugzilla - Users mailing list archive at Nabble.com.

Michael Nielsen

unread,
Jul 10, 2007, 9:18:10 AM7/10/07
to
Max Kanat-Alexander wrote:
> You need to run checksetup.pl one more time. Just trust me. I
> wrote it. :-) That's what you need to do. :-)

Works like a charm, now I'm able to reassign, the mail never appears
but I think my company's exchange server is acting up.

Much appreciated
Michael

Kathy

unread,
Jul 19, 2007, 7:03:43 PM7/19/07
to


I'm getting the same error.

I'm running Bugzilla 3.0 on server and copied database from Bugzilla
2.22 installation.

When i try to reassign I get the same error as others.


"DBD::mysql::db do failed: Illegal mix of collations

(utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for
operation 'case' at /var/www/html/bugzilla-3.0/process_bug.cgi line
1689 "

But mysql status shows characterset as latin1 and it's utf8 in
Bugzilla. Does this mean that I should alter database to utf8?

Please advice.

Thanks,
Kathy

mysql> status
--------------
mysql Ver 14.12 Distrib 5.0.40, for pc-linux-gnu (i686) using
readline 5.0

Connection id: 859
Current database:


Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;

Server version: 5.0.40-enterprise-gpl MySQL Enterprise Server
(GPL)


Protocol version: 10
Connection: Localhost via UNIX socket

Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 8 hours 11 min 58 sec

Threads: 2 Questions: 49281 Slow queries: 11921 Opens: 817 Flush
tables: 2 Open tables: 64 Queries per second avg: 1.670
--------------

Kathy

unread,
Jul 19, 2007, 7:10:18 PM7/19/07
to
On Jul 10, 8:18 am, Michael Nielsen <mich...@gruenielsen.dk> wrote:

This Kathy again. I'm sorry, "Status" command output was not right in
my earlier posting.

Here it is:

As you can see, it's:

Server characterset: latin1
Db characterset: utf8


Client characterset: latin1
Conn. characterset: latin1

What should I do? Please Advice

Thanks,
Kathy

mysql> use Bugs;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed


mysql> status
--------------
mysql Ver 14.12 Distrib 5.0.40, for pc-linux-gnu (i686) using
readline 5.0

Connection id: 859
Current database: Bugs


Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.40-enterprise-gpl MySQL Enterprise Server
(GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1

Db characterset: utf8


Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /var/lib/mysql/mysql.sock

Uptime: 8 hours 37 min 5 sec

Threads: 2 Questions: 49963 Slow queries: 12094 Opens: 817 Flush
tables: 2 Open tables: 64 Queries per second avg: 1.610

Kathy

unread,
Jul 23, 2007, 6:55:35 PM7/23/07
to
On Jul 10, 8:18 am, Michael Nielsen <mich...@gruenielsen.dk> wrote:

Thanks Max. My issue is fixed. Alter database followed by running
checksetup.pl took care of this.

Greatly appreciated.
Kathy

0 new messages