Mailing List Archive

[Bug 3519] make test failures for bayessql.t
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519





------- Additional Comments From parkerm@pobox.com 2004-06-17 13:08 -------
Subject: Re: New: make test failures for bayessql.t

I get this same error when my token column is defined as bytea. This
leads me to believe that bytea is not viable. Try changing the column
type to char(5) and see if it fixes the errors.

Michael





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3519] make test failures for bayessql.t [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519





------- Additional Comments From snyder@roguewave.com 2004-06-17 14:54 -------
Already done. I was getting these errors before I tried bytea.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3519] make test failures for bayessql.t [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519





------- Additional Comments From parkerm@pobox.com 2004-06-17 15:05 -------
Subject: Re: make test failures for bayessql.t

Please do a \d bayes_token in psql and paste it into the bug.

What version of DBD::Pg are you using?

Any idea what locale your databases were inited under?

Michael





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3519] make test failures for bayessql.t [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519





------- Additional Comments From snyder@roguewave.com 2004-06-17 16:01 -------
spamassassin=# \d bayes_token
Table "public.bayes_token"
Column | Type | Modifiers
------------+--------------+----------------------
id | integer | not null default '0'
token | character(5) | not null default ''
spam_count | integer | not null default '0'
ham_count | integer | not null default '0'
atime | integer | not null default '0'
Indexes: bayes_token_pkey primary key btree (id, token)

perl-DBD-Pg-1.21-2 is the rpm

It's possible that the database was created while my locale was set to
en_US.UTF-8 instead of en_US. I'll poke around a bit more.






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3519] make test failures for bayessql.t [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519





------- Additional Comments From parkerm@pobox.com 2004-06-17 16:30 -------
Subject: Re: make test failures for bayessql.t

On Thu, Jun 17, 2004 at 04:01:55PM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:

> ------- Additional Comments From snyder@roguewave.com 2004-06-17 16:01 -------
> spamassassin=# \d bayes_token
> Table "public.bayes_token"
> Column | Type | Modifiers
> ------------+--------------+----------------------
> id | integer | not null default '0'
> token | character(5) | not null default ''
> spam_count | integer | not null default '0'
> ham_count | integer | not null default '0'
> atime | integer | not null default '0'
> Indexes: bayes_token_pkey primary key btree (id, token)

This looks fine, it's a little different than mine:
spamassassin=# \d bayes_token;
Table "public.bayes_token"
Column | Type | Modifiers
------------+--------------+-----------------------------
id | integer | not null default 0
token | character(5) | not null default ''::bpchar
spam_count | integer | not null default 0
ham_count | integer | not null default 0
atime | integer | not null default 0
Indexes:
"bayes_token_pkey" primary key, btree (id, token)

But that is probably because I'm running 7.4.3.

> perl-DBD-Pg-1.21-2 is the rpm
>

DBD::Pg < 1.31 is known to have problems with the Bayes SQL code, see
this in README.bayes:
NOTE: Some users have reported problems using DBD::Pg v1.22. There
appears to be a bug in how parameters are quoted in that version, we
recommend you upgrade to at least v1.31.

Also, Bug 3415.

Upgrade to at least 1.31 and see if the error still occurs.

> It's possible that the database was created while my locale was set to
> en_US.UTF-8 instead of en_US. I'll poke around a bit more.
>

I've seen problems in the past with the locale setting, might be a red
herring, but something to keep in mind.

Michael





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3519] make test failures for bayessql.t [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519





------- Additional Comments From snyder@roguewave.com 2004-06-18 09:33 -------
The DB was created under the en_US locale, and the tests are also being run
under the en_US locale. It still could be a problem with libraries I suppose--
when test 17 runs, there are a few queries that fail because of this error
(logged on the server)

Jun 18 08:03:53 vault pg733tmp[14898]: [108] ERROR: parser: unterminated quoted
string at or near "'\200" at character 148

Of course it's not always \200, sometimes it's others:
"'Y\201L#"
"'|#\231#"
"'|#\231#"
"'~"
"'|#\231#"

I don't know what the # is about-- in my syslog those are blanks.





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3519] make test failures for bayessql.t [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519





------- Additional Comments From parkerm@pobox.com 2004-06-18 09:38 -------
Subject: Re: make test failures for bayessql.t

On Fri, Jun 18, 2004 at 09:33:58AM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> Jun 18 08:03:53 vault pg733tmp[14898]: [108] ERROR: parser: unterminated quoted
> string at or near "'\200" at character 148
>

Ding, I'm pretty sure this is a bug in DBD::Pg which was fixed in
1.31. Upgrade and see if that helps.

Michael





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3519] make test failures for bayessql.t [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519





------- Additional Comments From jm@jmason.org 2004-06-18 09:44 -------
might make a good FAQ entry...



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3519] make test failures for bayessql.t [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519





------- Additional Comments From snyder@roguewave.com 2004-06-18 09:48 -------
Unless I did something wrong (which is certainly possible, so I'll redo it),
I've already done the upgrade but am still getting the error. I'll try it again
and let you know how it goes.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3519] make test failures for bayessql.t [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519





------- Additional Comments From parkerm@pobox.com 2004-06-18 11:19 -------
Subject: Re: make test failures for bayessql.t

There is already a note in README.bayes. But perhaps once we release
it could be added to the FAQ.

Michael





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3519] make test failures for bayessql.t [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519





------- Additional Comments From snyder@roguewave.com 2004-06-18 12:55 -------
Well, to finally close the loop: failed tests have gone away, but it took
upgrading to 7.4.2 before the problems were gone. Here are all the steps I took
so that others having the same problem can see what I tried and (perhaps)
recognize something that I missed.

Started with stock RH 9 on i386, PostgresSQL 7.3.2 libs
installed SA 3.0 (000000)

(first attempt to resolve test errors)
upgraded DBI (to 1.42)and DBD:Pg (to 1.32) via CPAN (not rpm)
removed old DBD::Pg libs and modules

(second attempt to resolve)
reinstalled DBD::Pg
updated (via rpm) to postgresSQL 7.3.6 libs and headers
reinstalled DBD::Pg again

(third attempt to resolve, which appears to have finally worked)
downloaded rpms for PostgresSQL 7.4.2 and installed

The server is still running 7.3.3 on a remote machine, but the local client is
running 7.4.2 code.





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3519] make test failures for bayessql.t [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519





------- Additional Comments From parkerm@pobox.com 2004-06-18 13:04 -------
Subject: Re: make test failures for bayessql.t

Interesting, I'm guessing there was an additional quote bug fixed at
some point in PostgreSQL between 7.3.6 and 7.4.2.

I'll add an additional note to README.bayes about problems with
PostgreSQL and then close this bug.

Michael





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 3519] make test failures for bayessql.t [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519

parkerm@pobox.com changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |spamassassin-
| |dev@incubator.apache.org
AssignedTo|spamassassin- |parkerm@pobox.com
|dev@incubator.apache.org |
Target Milestone|3.1.0 |3.0.0



------- Additional Comments From parkerm@pobox.com 2004-06-18 13:07 -------
Taking



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are on the CC list for the bug, or are watching someone who is.
[Bug 3519] make test failures for bayessql.t [ In reply to ]
http://bugzilla.spamassassin.org/show_bug.cgi?id=3519

parkerm@pobox.com changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED



------- Additional Comments From parkerm@pobox.com 2004-06-18 17:47 -------
Committed revision 21429



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.