heya,

I have a quick and painless (i hope :) )question..

Do you know how the username length is limited under MySQL. There is no mention of 
this in the manual or books. I figured the username length was dynamically limited by 
the length of the User field in the mysql.user table.

But i have users with Username longer than 32 characters and those get an Access 
denied error. And, say the username is "supercalifragilistixexpicalidocious" (36 
characters) it tells that user "[EMAIL PROTECTED]" can't login.  I have then changed 
the user field length in the mysql.user table to 128. But still, can't login.

I've looked into the code. First thing, the username is cropped at 32 characters in 
the error message itself. Indeed, in errmsg.txt, the access denied error format string 
is :

"Access denied for user: '[EMAIL PROTECTED]' to database '%-.64s'"

I haven't tried recompiling with a longer username string conversion, but if you guys 
tell me MySQL is not cropping the username before matching it against the privilege 
table, i will to be sure. I have looked at the user authentication code and haven't 
found anything that would seem to crop at 32 characters even though i have found a 
constant name USERNAME_LENGTH fixed at 16 characters..which would have been coherent 
if it was fixed at 32 .. so i don'treally know what to believe.

Can anyone tell me exactly what happens ? Is mysql really hard limiting the username 
to 32 characters ? I don't think i have a hostname issue since from a same machine, 
another login with the exact same user privilege except the username length works..

If mysql crops the username, is there a patch against it ? If someone can point me 
where in the code this is handled i could do the patch myself, just need a hint as to 
where to find the stuff :) I have merely overlooked the code to find obvious proff 
mysql was doing this but didn't.

any insight would be greatly appreciated.

Thank guys


-- 
Chand

"Speed is good but stability is god."
(c) Joel, 2003

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to