Re: [patch] Auth to have case sensitive username matching in DB container

From: Date: Thu, 13 May 2004 08:41:28 +0000
Subject: Re: [patch] Auth to have case sensitive username matching in DB container
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-29179@lists.php.net to get a copy of this message
Hi Ian Eure, you wrote: > It appears that for some (broken?) databases, doing a SELECT WHERE usernamecol > = 'jOe' will match a row where usernamecol = 'joe'. The submitter > doesn't > specify what database they are using, but this certainly seems like incorrect > behavior. I know that PostgreSQL won't do this, and MySQL only does > case-insensitive searches if you use LIKE. No, it compares case-sensitive *only* on "binary" declared columns: mysql> SELECT 'A' = 'a'; +-----------+ | 'A' = 'a' | +-----------+ | 1 | +-----------+ 1 row in set (0.00 sec) mysql> SELECT 'A' = BINARY 'a'; +------------------+ | 'A' = BINARY 'a' | +------------------+ | 0 | +------------------+ 1 row in set (0.00 sec) as does MSSQL (depending on the database settings): 1> SELECT 1 WHERE 'a' = 'A'; 2> go ----------- 1 (1 row affected) 1> SELECT 1 WHERE 'a' != 'A'; 2> go ----------- (0 rows affected) Regards, -- Michael - < mike(@)php.net >

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.pear.dev (#29179) next »