LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Eric Thomas <[log in to unmask]>
Tue, 23 May 2006 23:41:36 +0200
text/plain (36 lines)
> 23 May 2006 10:06:02 Connecting to ODBC data source DEFAULT...
> 23 May 2006 10:06:02 Connected to data source didage.
> SQL> SELECT EMAIL,USUARIO,PRUEBA FROM PRUEBA WHERE UCORREO LIKE *? {escape
> '*'}*

This should have been:

SELECT EMAIL,USUARIO,PRUEBA FROM PRUEBA WHERE UCORREO LIKE ? {escape '*'}

I can't see where the additional asterisks are coming from. "LIKE ?" is a
constant in the source code, there is no formatting of anything before the
question mark. Anyway, the error message was:

> >>> 37000/1064: [MySQL][ODBC 3.51 Driver][mysqld-5.0.18-nt]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 '{escape '*'}' at 
> line 1

It looks like the ODBC driver does not support the ODBC sequence '{escape
'*'}'. Instead of replacing it with the mysql-specific syntax for LIKE
escape sequences, which is ESCAPE '*', it just passed the escape sequence to
mysql, which of course rejected it.

As a band-aid, you can add:

DBMS_NO_HOSTNAME_ALIASING=1

in SITE.CFG. I think this is a good setting for new LISTSERV installations
anyway. It will make this problem go away for SUBSCRIBE by making LISTSERV
not use LIKE any more in that particular case, but some functions will
remain broken. For instance, QUERY ... FOR john_smith@*.xyz.com will still
give you the above error. The only solution is for myODBC to support the
escape sequence.

  Eric

ATOM RSS1 RSS2