Loading...

courier-imap@lists.sourceforge.net

[Prev] Thread [Next]  |  [Prev] Date [Next]

[Courier-imap] Courier MySQL authentication does not work with sql-mode=ansi Алексей Инкин Mon Apr 23 06:06:42 2007

Hi everyone.

Just faced this problem. I use MySQL which is configured to work in ANSI mode. 
This is rather common configuration (mysqld runs with --sql-mode=ansi 
argument). It appears that Courier MySQL authentication module does not work 
in this mode. In ANSI mode strings are only allowed in single quotes ( ' ) 
not double one ( " ). Double quotes are only used to enclose column names 
that contain characters that are otherwise unallowed. And the module 
generates SQL queries with double quotes like the following:

Apr 21 17:23:53 torpeda authdaemond: SQL query: SELECT id, "", clear, uid, 
gid, home, "", "", name, "" FROM users WHERE id = "[EMAIL PROTECTED]"
Apr 21 17:23:53 torpeda authdaemond: mysql_query failed, reconnecting: Unknown 
column '' in 'field list'
Apr 21 17:23:53 torpeda authdaemond: mysql_query failed second time, giving 
up: Unknown column '' in 'field list'
Apr 21 17:23:53 torpeda authdaemond: authmysql: TEMPFAIL - no more modules 
will be tried

In order to fix this issue and to make the module work in both MySQL SQL modes 
all the queries that the module generates must be rewritten using single 
quotes. Guys, I hope this will be done for I like strict design in everything 
and I prefer strict SQL mode very much.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Courier-imap mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap