Bug #7474 problem in privileges table
Submitted: 22 Dec 2004 10:01 Modified: 22 Dec 2004 14:55
Reporter: Tobia Caneschi Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:mysql 4.1.7 OS:Linux (linux)
Assigned to:

[22 Dec 2004 10:01] Tobia Caneschi
Description:
I changed the size in the db "mysql" table "user" of "User" field from
VARCHAR(15) to VARCHAR(100).

the grant system command doesn't read the new size of the field and the grant command doesn't work with user greater than the default size.

the error is "#1145 - The host or user argument to GRANT is too long"

i think that the sql grant command is strictly linked with the user/db table, but the master value for limits should be the correspondent field lenght and not the grant precompiled value.
 
i'm very sorry for my bad english but i'm studing too...

tobia

How to repeat:
change the size in the db "mysql" table "user" of "User" field from
VARCHAR(15) to VARCHAR(100).

and execute same grant on user of 30 character lenght.

Suggested fix:
reads the limit for Host, Db, User directly from the structure of system db "mysql"....
[22 Dec 2004 14:55] Hartmut Holzgraefe
you are not supposed to change the schema of any table within the "mysql"
database in any way, the server absolutely relies on the exact setup
[22 Dec 2004 15:10] Tobia Caneschi
in mysql 3.23 the operation works fine, i'm the only one developer that changes the user lenght value??. sorry to take your time.

tobia