Problem with Mysql 5.1

35 views
Skip to first unread message

Tino Breddin

unread,
Oct 31, 2010, 4:28:08 PM10/31/10
to Repo and Gerrit Discussion
Hi,

I setup a new Gerrit site with a MySQL backend. Everything works fine
except the auto-completion within text fields. Whenever a character is
typed in a text field which supports completion, Gerrit will encounter
the following error:

===========
[2010-10-31 19:51:15,108] WARN / : Error in suggestAccountGroup
com.google.gwtorm.client.OrmException: fetch failure on
account_group_names
at
com.google.gwtorm.schema.sql.SqlDialect.convertError(SqlDialect.java:
122)
at
com.google.gwtorm.jdbc.JdbcAccess.convertError(JdbcAccess.java:331)
at com.google.gwtorm.jdbc.JdbcAccess.queryList(JdbcAccess.java:
152)
at
com.google.gerrit.reviewdb.AccountGroupName_Access_accountGroupNames_GwtOrm
$ Source) at com.google.gerrit.httpd.rpc.SuggestServiceImpl
$3.run(SuggestServiceImpl.java
at com.google.gerrit.httpd.rpc.SuggestServiceImpl
$3.run(SuggestServiceImpl.java
at org.eclipse.jetty.util.thread.QueuedThreadPool
$2.run(QueuedThreadPool.java:4

***snip***

at java.lang.Thread.run(Thread.java:619)Caused by:
java.sql.SQLException: Illegal mix of collations
(latin1_swedish_ci,IMPLICITERCIBLE) for operation '<=' at
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
3558) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
3490)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:
2648)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:
2077
at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:
2219)
at com.google.gwtorm.jdbc.JdbcAccess.queryList(JdbcAccess.java:
136)
... 49 more
===========

Mysql version: 5.1.50-log Gentoo Linux mysql-5.1.50-r1

The default character set is latin1.

I appreciate any hints.

Cheers,
Tino

Shawn Pearce

unread,
Nov 1, 2010, 10:13:15 AM11/1/10
to Tino Breddin, Repo and Gerrit Discussion
On Sun, Oct 31, 2010 at 13:28, Tino Breddin <tino.b...@googlemail.com> wrote:
> I setup a new Gerrit site with a MySQL backend. Everything works fine
> except the auto-completion within text fields. Whenever a character is
> typed in a text field which supports completion, Gerrit will encounter
> the following error:
...

>        at java.lang.Thread.run(Thread.java:619)Caused by:
> java.sql.SQLException: Illegal mix of collations
> (latin1_swedish_ci,IMPLICITERCIBLE) for operation '<='        at
...

> Mysql version: 5.1.50-log Gentoo Linux mysql-5.1.50-r1
>
> The default character set is latin1.

*sigh* Yet another MySQL "feature".

We can't use Unicode because MySQL stores UTF-8 using 3 bytes per
character, and one of our primary key indexes then exceeds the maximum
row length permitted for an index key. So admins are either forced to
decrease the size of the file name VARCHAR column in patch_comments,
or they need to use latin1 as the character encoding. But from above
it looks like its using a different latin1 than we tested with, you
have a swedish based latin1 vs. the US based latin1 I've normally used
with MySQL. I'm sure there is a difference in the two character sets,
and the "max" character we are trying to use during a completion query
isn't defined in latin1_swedish_ci, but is in the US based latin1 I
have thus far used with MySQL.

Use PostgreSQL or H2 ? :-)

Tino Breddin

unread,
Nov 1, 2010, 10:59:13 AM11/1/10
to Shawn Pearce, Tino Breddin, Repo and Gerrit Discussion
It really is a nasty beast :-) I used it for convenience reasons since it was setup and running already. I'll probably move to H2 then.

Cheers

Reply all
Reply to author
Forward
0 new messages