https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8042

--- Comment #6 from Sidney Markowitz <sid...@sidney.com> ---
The first error is
dbg: bayes: tok_get_all: SQL error: Illegal mix of collations for operation
'in'

That can only be in MYSQL.pm line 464 which is the query constructed from

  my $multi_sql = "SELECT $token_select, spam_count, ham_count, atime           
                     FROM bayes_token                                           
                    WHERE id = ?                                                
                      AND token IN ";

with the correct number of question marks in a list added at the end.

Then there is 

      my $idx = 0;
      $sth->bind_param(++$idx, $self->{_userid});
      $sth->bind_param(++$idx, $_, DBI::SQL_BINARY) foreach (@tok);

In sql/bayes_mysql.sql the schema is shown with CREATE TABLE bayes_token (
  id int(11) NOT NULL default '0',
  token binary(5) NOT NULL default '', ...

If that's how the database is set up, then shouldn't there no way that there
could be a mismatch of types comparing token from that binary column with a
prepared variable of type SQL_BINARY?

Giovanni, is it possible that the schema is wrong in the database?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to